紧急请高手进!我是菜鸟~做到难点的请 讲解下~谢了!~~

wineyjz 2007-05-10 06:45:20
填空题
一:
char*pcColor="blue1234";
char acColor[]="blue1234";
char str[]="\\\0"
strlen(pcColor)=_____
strlen(acColor)=_____
strlen(str) =_____
sizeof(pcColor)=_____
sizeof(acColor)=_____
sizeof(str) =_____
二:
union tagAA
{
struct
{
char ucFist;
short usSecond;
char ucThird;
}half;
long 11;
}number;

struct tagBB
{
char ucFist;
short usSecond;
char ucThird;
short usForth;

}half;

struct tagCC
{
struct
{
char ucFist;
short usSecond;
char ucThird;
}half;
long 11;

};
在字节对齐为1下,sizeof(union tagAA).sizeof(struct tagBB).sizeof(struct tagCC).是_____
在字节对齐为4,sizeof(union tagAA).sizeof(struct tagBB).sizeof(struct tagCC).是_____

...全文
150 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
abcdbopomof 2007-05-11
  • 打赏
  • 举报
回复
懒人学不了东西的!!
wineyjz 2007-05-10
  • 打赏
  • 举报
回复
说的也是~~不过 我想快
samchoy 2007-05-10
  • 打赏
  • 举报
回复
晕,编个程序实践一下不就知道了?

13,826

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧