确定不同整型数据类型在内存中占多大(字节),输出不同整型数据类型在内存中占多大(字节)。

#include<stdio.h>
int main()
{
	printf("%d\n", sizeof(char));
	printf("%d\n",sizeof(short));
	printf("%d\n", sizeof(int));
	printf("%d\n", sizeof(long));
	printf("%d\n", sizeof(float));
	printf("%d\n",sizeof(double));
	return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_62839396/article/details/121205408