读书人

紧急请小弟我是初学者~做到难点的请 讲

发布时间: 2012-03-21 13:33:14 作者: rapoo

紧急请高手进!我是菜鸟~做到难点的请 讲解下~谢了!~~
填空题
一:
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).是_____



[解决办法]
懒人学不了东西的!!

读书人网 >C++ Builder

热点推荐