How many bytes does double occupy?
Dec 25, 2020 am 10:36 AMThe 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
- char: 1 byte
- char* (i.e. pointer variable): 4 bytes (32 The bit addressing space is 2^32, which is 32 bits, which is 4 bytes. The same applies to 64-bit compilers)
- 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* (i.e. pointer variable): 8 bytes
- short int: 2 bytes
- int: 4 bytes
- unsigned int : 4 bytes
- float: 4 bytes
- ##double: 8 bytes
- long long: 8 bytes
- unsigned long: 8 Bytes
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!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

C++ program to convert double type variable to int type

What is the difference between float and double

Interpretation of Java documentation: Analysis of the function of the valueOf() method of the Double class

How to use the isPositiveInfinity() method of the Double class to determine whether a number is positive infinity

Interpretation of Java documentation: Functional analysis of compare() method of Double class

How to use the isInfinite() method of the Double class to determine whether a number is infinitesimal

Java Iterator vs. Iterable: Improve your understanding of Java collections