sizeof.c

来自「C_C++_C#程序员实用大全(精华版)源代码 代码详实 一步一步的深入 适」· C语言 代码 · 共 12 行

C
12
字号
#include <stdio.h>

void main(void)
 {
   printf("Variables of type int use %d bytes\n", sizeof(int));
   printf("Variables of type float use %d bytes\n", sizeof(float));
   printf("Variables of type double use %d bytes\n", sizeof(double));
   printf("Variables of type unsigned use %d bytes\n", sizeof(unsigned));
   printf("Variables of type long use %d bytes\n", sizeof(long));
 }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?