主题:[讨论]= gcc数据类型 =
#include<stdio.h>
#include<memory.h>
int clear();
int clear()
{ printf("\n--------------------------------------------------\n");
}
/////////////////////////////////////////////////////////////////////////////////
int main()
{ clear();
printf("signed int:\t\t\t%d",sizeof(int));
clear();
printf("signed short:\t\t\t%d",sizeof(short));
clear();
printf("signed long:\t\t\t%d",sizeof(long));
clear();
printf("unsigned int:\t\t\t%d",sizeof(unsigned int));
clear();
printf("unsigned short:\t\t\t%d",sizeof(unsigned short));
clear();
printf("unsigned long:\t\t\t%d",sizeof(unsigned long));
clear();
printf("float:\t\t\t\t%d",sizeof(float));
clear();
printf("double:\t\t\t\t%d",sizeof(double));
clear();
printf("long double:\t\t\t%d",sizeof(long double));
clear();
printf("char:\t\t\t\t%d",sizeof(char));
clear();
printf("unsigned char:\t\t\t%d",sizeof(unsigned char));
clear();
}
#include<memory.h>
int clear();
int clear()
{ printf("\n--------------------------------------------------\n");
}
/////////////////////////////////////////////////////////////////////////////////
int main()
{ clear();
printf("signed int:\t\t\t%d",sizeof(int));
clear();
printf("signed short:\t\t\t%d",sizeof(short));
clear();
printf("signed long:\t\t\t%d",sizeof(long));
clear();
printf("unsigned int:\t\t\t%d",sizeof(unsigned int));
clear();
printf("unsigned short:\t\t\t%d",sizeof(unsigned short));
clear();
printf("unsigned long:\t\t\t%d",sizeof(unsigned long));
clear();
printf("float:\t\t\t\t%d",sizeof(float));
clear();
printf("double:\t\t\t\t%d",sizeof(double));
clear();
printf("long double:\t\t\t%d",sizeof(long double));
clear();
printf("char:\t\t\t\t%d",sizeof(char));
clear();
printf("unsigned char:\t\t\t%d",sizeof(unsigned char));
clear();
}