The length of the basic data type in the C language:
Under 32 bits:
Char:1 bytes (unchanged)
* (pointer variable): 4 bytes (32-bit machine's addressing space is 4 bytes.) Similarly 64-bit compilers) (change)
Short Int:2 bytes (unchanged )
Int:4 bytes (unchanged )
Unsigned int:4 bytes (unchanged )
Float:4 bytes (unchanged )
Double:8 bytes (unchanged )
Long:4 bytes (varies )
Unsigned long:4 bytes (change *, is actually the address length value of the addressing control)
Long Long:8 bytes (unchanged )
Under 64 bits:
Char 1 bytes (unchanged )
* (pointer variable): 8 bytes
Short Int:2 bytes (unchanged )
Int:4 bytes (unchanged )
Unsigned int:4 bytes (unchanged )
Float:4 bytes (unchanged )
Double:8 bytes (unchanged )
Long:8 bytes (varies )
Unsigned long:8 bytes (change * is actually the address length value of the addressing control)
Long Long:8 bytes (unchanged )
Except that * and long vary with the operating system Zichang, others are fixed (32-bit vs. 64)
BOOL 1 bytes char 1 byte int 4 bytes float 4 bytes Doubl 8 bytes Long Long 8 bytes
In OC:
64-bit system (this machine is not a 32-bit system can not be tested):
NSString 8-bit
Nsinteger 8-bit (signed)
Nsuinteger 8 bits (unsigned, no negative numbers)
Many variables in OC are actually pointers, so many of the 64-bit systems are 8-bit,
By the way, NSNumber,Nsinteger is the underlying type, but NSNumber is a class. If you want to Nsmutablearray or
nsmutabledictionary Store A value, the direct use of Nsinteger is not, to first convert to NSNumber class,
This article refers to the http://blog.csdn.net/totogo2010/article/details/7655908
32-bit, 64-bit operating system base data type byte size