機器平台:x86_64 處理器
作業系統:red hat 4.1.2-14
編譯器: gcc version 4.1.2 20070626
size of char is: 1
size of unsigned char is: 1
size of signed char is: 1
size of int is: 4
size of short is: 2
size of long is: 8
size of long int is: 8
size of signed int is: 4
size of unsigned int is: 4
size of unsigned long int is: 8
size of long long int is: 8
size of unsigned long long is: 8
size of float is:
4size of double is: 8
size of long double is:
16
size of (void *) is: 8
size of (char *) is: 8
size of (int *) is: 8
size of (long *) is: 8
size of (long long *) is: 8
size of (float *) is: 8
size of (double *) is: 8
——————————————————————————
機器平台: x86_32 處理器
作業系統:
windows xp sp2
編譯器:
vs2005自帶的c++編譯器
size of char is: 1
size of unsigned char is: 1
size of signed char is: 1
size of int is: 4
size of short is: 2
size of long is: 4
size of long int is: 4
size of signed int is: 4
size of unsigned int is: 4
size of unsigned long int is: 4
size of long long int is: 8
size of unsigned long long is: 8
size of float is: 4
size of double is: 8
size of long double is: 8
size of (void *) is:
4 size of (char *) is: 4
size of (int *) is: 4
size of (long *) is: 4
size of (long long *) is: 4
size of (float *) is: 4
size of (double *) is: 4
**形式:32位機器下面
資料型別
說明位元組數
取值範圍
bool
布林型1
true,false
char
字元型1
-128~127
unsigned char
無符號字元型
10~255
short
短整型2
-32768~32767
unsigned short
無符號短整型
20~65535
int整型
4-2147483648~2147483647
unsigned
無符號整型
40~4294967295
long
長整型4
-2147483648~2147483647
unsigned long
無符號長整型
40~4294967295
float
單精度型
4-3.4×10-38~3.4×10-38
double
雙精度型
8-1.7×10-308~1.7×10-308
long double
長雙精度型
8-1.7×10-308~1.7×10-308
32位機和64位機下面各型別sizeof的大小
執行結果如下 分別用藍色和紅色標記了兩者的差異 機器平台 x86 64 處理器 作業系統 red hat 4.1.2 14 編譯器 gcc version 4.1.2 20070626 size of char is 1 size of unsigned char is 1 size of sign...
32位機和64位機下面各型別sizeof的大小
這種型別的題目出的太多了,還是整理下吧!一 機器平台 x86 64 處理器 作業系統 red hat 4.1.2 14 編譯器 gcc version 4.1.2 20070626 char 1 unsigned char 1 signed char 1 int 4 short 2 long 8 l...
32位和64位機資料型別的大小
32位系統和64位有什麼區別?通常的64位技術是相對32位而言的,這個位數指的是cpu gprs general purpose register通用暫存器 的資料寬度為64位,而32位的處理器的通用暫存器的資料寬度為32位,64位指令集就是執行64位資料的指令,也就是說一次可以執行64bit的資料...