IOS data type

Source: Internet
Author: User

OC: Basic data type number of words 450 read 881 comments 2 likes 5 basic type type qualifier modifier

In addition to the basic types, there are some types of qualifier modifiers

    • Short shorter type, modified int, double;
    • Long, modified int, double;
    • Signed is a symbolic type, modified int, char;
    • Unsigned unsigned type, modified int, char;

1. These qualifiers are often used to qualify int, which can be omitted when the int type is qualified;
2.short and long will change the length of the int, the length of different compilers is not the same, but the general short length is not much longer than int,int length;
3.signed and unsigned do not change the type length, only indicates whether the highest level is a sign bit, where unsigned represents a positive number greater than or equal to 0;

Range of values

In order to be able to find and use the data type correctly in future development, the following is the value range of some data types:

    • int:-2147483648~2147483647
    • unsigned int:0~4294967295
    • short:-32768~32767
    • unsigned short:0~65535
    • Long: -2147483648~2147483647
    • unsigned long:0~4294967295
Storage space

The following is a list of storage spaces used by common data types

2byte
data type 16-bit compiler 32-bit compiler 64-bit compiler
Char 1byte 1byte 1byte
int 4byte 4byte
float 4byte 4byte 4byte
double 8byte 8byte 8byte
Short int 2byte 2byte 2byte
unsigned int 2byte 4byte 4byte
long 4byte 4byte 8byte
unsigned long 4byte 4byte 8byte
Long Long 8byte 8byte 8byte

IOS data type

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.