C语言有字符类型(char),短整数类型(short int),整数类型(int),长整数类型(long int),浮点类型也称单精度浮点型(float),双精度浮点型(double)
基本数据类型的长度为字符类型char(1byte),短整数short int (2byte),整数类型int (4byte),长整数类型long int (4byte或者是8byte都可以),浮点型类型float (4byte),双精度类型double (8byte)
可用一下C语言代码查看基本数据类型的长度
#include<stdio.h>
int main()
{
printf("%d\n",sizeof(char));
printf("%d\n",sizeof(short int));
printf("%d\n",sizeof(int));
printf("%d\n",sizeof(long int));
printf("%d\n",sizeof(float));
printf("%d\n",sizeof(double));
}