- data |=(0x1<<6)
data &=~(0x1<<6)
data ^=(0x1<<6)
- K=5;a=8,b=10,c=5;d=5,因为errinfo3是容量为5的字符数组。
- (1)tmpInfo1.height=1;
(2)tmpInfo1.baseInfo.with=2;
(3)tmpInfo2.height=1;
(4)tmpInfo2->baseInfo.with=2;
(5)*tmpInof3.height=1;
(6)*tmpInof3->baseInfo->with=2;
4.b=7;
5.(1)int* p=(int*)0x80000000;
A *p=tmp;
B tmp=*p;
- char* p=(char*)&tmp;
for(int i=0;i<4;i++)
{
*buf[4+i]=*p[i];
}
- char *buf{count];-====>char** buf =(char**)malloc(count* sizeof(char*));
Int i;
for(i=0;i<count;i++){
buf[i]=(char*)malloc(100);
}
6.
- seqn[tail]=data;
- data=seqn[tail-1];
- If(tail==1)
{
Printf(“队列为空\n”);
}
- If(tail==32)
{
Printf(“队列为满\n”);
}
- tail=1;
- count=tail-1;
- 31个
- (1)int a=i/8;int b=i%8;Rdy[a] &=(0x1<<b);
- Int a=j/8;int b=j%8;Rdy[a] &=~(0x1<<b);
for(int i=0;i<64;i++)
{
Int a=i/8;int b=i%8;
If(Rdy[a] &=(0x1<<b))
{
return i;
}
}
return -1;
8.data可能越界访问,要先判断i是否小于100
9.m是字符类型,fun的参数是int*类型,m的值会变成15的ASCII码值
10.(1)line5中str容量不够,无法复制完整字符串,
line7后面缺少将str指向NUll的语句,会出现野指针
- line2改为p=(char*)malloc(12);
line7后面加上line8str=NULL;