Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How many bytes does double take?

Shulou Source: shulou.com Published: 2022-06-02 17:16:51 09月29日 Update

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!

Tags: Bytes compilers variables pointers content articles that is value interests guys buddies more knowledge space industry information information channels channels references Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info OPPO Reno macOS Shulou Information Apple