How many bytes does double take?
This article mainly introduces how many bytes double occupies in total. The introduction in the article is very detailed and has certain reference value. Interested friends must read it!
Double bytes: 1, 16-bit compiler, double 8 bytes;2, 32-bit compiler, double 8 bytes;3, 64-bit compiler, double 8 bytes.
Double bytes:
1. 16-bit compiler
char: 1 byte
char*(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
char: 1 byte
char*(pointer variable): 4 bytes (32-bit addressing space is 2^32, that is, 32 bits, that is, 4 bytes. 64-bit compiler)
short int : 2 bytes
int: 4 bytes
unsigned int : 4 bytes
float: 4 bytes
double: 8 bytes
long: 4 bytes
long long: 8 bytes
unsigned long: 4 bytes
3, 64-bit compiler
char: 1 byte
char*(pointer variable): 8 bytes
short int : 2 bytes
int: 4 bytes
unsigned int : 4 bytes
float: 4 bytes
double: 8 bytes
long: 8 bytes
long long: 8 bytes
unsigned long: 8 bytes
The above is all the contents of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!