Home Common Problem How many bytes does double occupy?

How many bytes does double occupy?

Dec 25, 2020 am 10:36 AM
double

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.

How many bytes does double occupy?

#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: 8 bytes
  • long long: 8 bytes
  • unsigned long: 8 Bytes
# If you want to know more about programming learning, please pay attention to the
php training

column!

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

C++ program to convert double type variable to int type C++ program to convert double type variable to int type Aug 25, 2023 pm 08:25 PM

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

What is the difference between float and double What is the difference between float and double Oct 11, 2023 pm 05:38 PM

What is the difference between float and double

Interpretation of Java documentation: Analysis of the function of the valueOf() method of the Double class Interpretation of Java documentation: Analysis of the function of the valueOf() method of the Double class Nov 04, 2023 am 10:55 AM

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

How many bytes does double occupy? How many bytes does double occupy? Dec 25, 2020 am 10:36 AM

How many bytes does double occupy?

How to use the isPositiveInfinity() method of the Double class to determine whether a number is positive infinity How to use the isPositiveInfinity() method of the Double class to determine whether a number is positive infinity Jul 24, 2023 pm 07:57 PM

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 Interpretation of Java documentation: Functional analysis of compare() method of Double class Nov 04, 2023 pm 12:25 PM

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 How to use the isInfinite() method of the Double class to determine whether a number is infinitesimal Jul 26, 2023 am 11:04 AM

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 Java Iterator vs. Iterable: Improve your understanding of Java collections Feb 19, 2024 pm 06:20 PM

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