int 2或4字节
float 4字节
double 8字节
long int 4字节
有效位数为字节数乘8-1(减去这个符号位)
可以用如下代码查看
#include
int main()
{
printf("char=%d\n", sizeof(char));
printf("short=%d\n", sizeof(short int));
printf("int=%d\n", sizeof(int));
printf("long=%d\n", sizeof(long int));
printf("long long=%d\n", sizeof(long long int));
printf("float=%d\n", sizeof(float));
printf("double=%d\n", sizeof(double));
printf("long double=%d\n", sizeof(long double));
return 0;
}