#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("int = %d Bytes\n",sizeof(int));
printf("short = %d Bytes\n",sizeof(short));
printf("long = %d Bytes\n",sizeof(long));
printf("unsigned = %d Bytes\n",sizeof(unsigned));
printf("float = %d Bytes\n",sizeof(float));
printf("double = %d Bytes\n",sizeof(double));
printf("long double = %d Bytes\n",sizeof(long double));
printf("char = %d Bytes\n",sizeof(char));
printf("unsigned char = %d Bytes\n",sizeof(unsigned char));
printf("unsigned short int = %d Bytes\n",sizeof(unsigned short int));
printf("unsigned long int = %d Bytes\n",sizeof(unsigned long int));
printf("char* = %d Bytes\n",sizeof(char*));
printf("int* = %d Bytes\n",sizeof(int*));
printf("double* = %d Bytes\n",sizeof(double*));
printf("long* = %d Bytes\n",sizeof(long*));
return 0;
}
运行结果