#include"stdio.h"
#include"stdlib.h"
int main(void)
{
char a=0;
int b=0;
short c=0;
float d=0;
double e=0;
long f=0;
long int g=0;
printf("测试变量长度\n");
printf("___________________________________________\n");
printf("char=%d\n",sizeof(a));
printf("int=%d\n",sizeof(b));
printf("short=%d\n",sizeof(c));
printf("float=%d\n",sizeof(d));
printf("double=%d\n",sizeof(e));
printf("long=%d\n",sizeof(f));
printf("long int=%d\n",sizeof(g));
return 0;
}
|