输出以下关键字的字节大小及输出一个地址: 1. #include<stdio.h> int main() { printf("%d\n",sizeof(char));//1 printf("%d\n", sizeof(short));//2 printf("%d\n", sizeof(int));//4 printf("%d\n", sizeof(float));//4 printf("%d\n", sizeof(double));//8 printf("%d\n", sizeof(long));//4 return 0; } 结果: 1 2 4 4 8 4 请按任意键继续. . . 2. 程序: #include<stdio.h> int main() { int sum = 99; printf("sum=%p\n",&sum); return 0; } 结果: sum=001EF7D4 请按任意键继续. . .
时间: 2024-12-29 04:27:26