C语言数据类型

基本数据类型: 整型(int)、浮点型(单精度浮点型(float)、双精度浮点型(double))、字符型(char)
指针类型: void * 
构造类型: 数组、结构体(strtuct)、共用体(union)、枚举(enum)
空类型: void 

类型修饰符:

short 短型 取值范围:-32768 ~ 32767
long 长型 取值范围:-2147483648 ~ 2147483647
signed 有符号型
unsigned 无符号型

以下写法都是正确的:
short int s1 = 1;
short s2 = 1;

long int l1 = 2;
long l2 = 2;

long long l1 = 10;

signed int si1 = 3;
signed si2 = 3;

unsigned int us1 = 4;
unsigned us2 = 4;

signed short int ss = 5;
unsigned long int ul = 5;

short跟int至少为16位(2字节)
long至少为32位(4字节)
short的长度不能大于int,int的长度不能大于long
char一定为8为(1字节),毕竟char是我们编程能用的最小数据类型

//*****************************************************

不同编译器环境下基本数据类型的存储长度:

          16为编译器   32为编译器   64为编译器
char            1        1        1
void *(指针变量)       2        4        8
short int          2        2       2
unsigned int        2        4       4
int              2        4        4
float            4        4       4
double            8        8       8
long            4        4       8
unsigned long         4        4       8
long long            8        8       8
//*****************************************************

原文地址:https://www.cnblogs.com/tzktzk1/p/3329426.html