
用sizeof(数据类型)这个函数打印出各个数据类型在内存中所占字节数
用sizeof(数据类型)这个函数打印出各个数据类型在内存中所占字节数,数据类型是指所有的数据类型...
用sizeof(数据类型)这个函数打印出各个数据类型在内存中所占字节数,数据类型是指所有的数据类型
展开
4个回答
2013-04-11
展开全部
这只是个表达式,是你所说的求数据类型的长度,比如sizeof(int),sizeof(float)等等,求出的字节数要看你的系统,不同的系统,所占的字节数是不一样的。

2023-08-15 广告
通常情况下,我们会按照结构模型把系统产生的数据分为三种类型:结构化数据、半结构化数据和非结构化数据。结构化数据,即行数据,是存储在数据库里,可以用二维表结构来逻辑表达实现的数据。最常见的就是数字数据和文本数据,它们可以某种标准格式存在于文件...
点击进入详情页
本回答由光点科技提供
2013-04-11
展开全部
printf("%d,%d,%d,%d,%d,%d,%d,%d,%d", sizeof(int), sizeof(long), sizeof(long long), sizeof(short), sizeof(char), sizeof(float), sizeof(double), sizeof(int*), sizeof(float*));
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
#include <stdio.h>
void main ()
{
printf("Variables of type short use %d bytes\n", sizeof(short));
printf("Variables of type int use %d bytes\n", sizeof(int));
printf("Variables of type long use %d bytes\n", sizeof(long));
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 char use %d bytes\n", sizeof(char));
}
void main ()
{
printf("Variables of type short use %d bytes\n", sizeof(short));
printf("Variables of type int use %d bytes\n", sizeof(int));
printf("Variables of type long use %d bytes\n", sizeof(long));
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 char use %d bytes\n", sizeof(char));
}
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
nvminles 5 2 f к· ㏄ yxcc
qdwyic
roih
bcuvgkn
ykxq
vca
qdwyic
roih
bcuvgkn
ykxq
vca
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询