/* 显示不同变量的大小 */
#include <stdio.h>
int main(void)
{
printf("
char: %llu byte", sizeof(char));
printf("
int: %llu byte", sizeof(int));
printf("
short: %llu byte", sizeof(short));
printf("
long: %llu byte", sizeof(long));
printf("
long long: %llu byte", sizeof(long long));
printf("
unsigned char: %llu byte", sizeof(unsigned char));
printf("
unsigned int: %llu byte", sizeof(unsigned int));
printf("
unsigned short: %llu byte", sizeof(unsigned short));
printf("
unsigned long: %llu byte", sizeof(unsigned long));
printf("
unsigned long long: %llu byte", sizeof(unsigned long long));
printf("
float: %llu byte", sizeof(float));
printf("
double: %llu byte", sizeof(double));
printf("
long double: %llu byte", sizeof(long double));
return 0;
}
