Home >Common Problem >How many bytes does double occupy?
The bytes occupied by double: 1. Under the 16-bit compiler, the double occupies 8 bytes; 2. Under the 32-bit compiler, the double occupies 8 bytes; 3. Under the 64-bit compiler, double occupies 8 bytes.
#The operating environment of this article: windows10 system, thinkpad t480 computer.
Bytes occupied by double:
1. 16-bit compiler
char: 1 byte
char* (i.e. pointer variable): 2 bytes
short int : 2 bytes
int: 2 bytes
unsigned int: 2 bytes
float: 4 Bytes
double: 8 bytes
long: 4 bytes
long long: 8 bytes
unsigned long: 4 bytes
##2, 32 Bit compiler
double: 8 bytes
3. 64-bit compiler
php training
The above is the detailed content of How many bytes does double occupy?. For more information, please follow other related articles on the PHP Chinese website!