三种类型之下分别是:short、int、long、char、float、double 这六个关键字
再加上两个符号说明符signed和unsigned就基本表示了C语言的最常用的数据类型。
下面列出了在32位操作系统下,常见编译器下的数据类型大小及表示的数据范围:
类型名称 | 占字节数 | 其他叫法 | 表示的数据范围 |
char | 1 | signed char | -128 ~ 127 |
unsigned char | 1 | none | 0 ~ 255 |
int | 4 | signed int | -2,147,483,648 ~ 2,147,483,647 |
unsigned int | 4 | unsigned | 0 ~ 4,294,967,295 |
short | 2 | short int | -32,768 ~ 32,767 |
unsigned short | 2 | unsigned short int | 0 ~ 65,535 |
long | 4 | long int | -2,147,483,648 ~ 2,147,483,647 |
unsigned long | 4 | unsigned long | 0 ~ 4,294,967,295 |
float | 4 | none | 3.4E +/- 38 (7 digits) |
double | 8 | none | 1.7E +/- 308 (15 digits) |
long double | 10 | none | 1.2E +/- 4932 (19 digits) |
C语言中的32个关键字 | |||
auto | double | int | struct |
break | else | long | switch |
case | enum | register | typedef |
char | extern | return | union |
const | float | short | unsigned |
continue | for | signed | void |
default | goto | sizeof | volatile |
do | if | static | while |
原文:https://www.cnblogs.com/mirocle/p/12114896.html