紧急请高手进!我是菜鸟~做到难点的请 讲解下~谢了!~~
填空题
一:
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).是_____
[解决办法]
懒人学不了东西的!!