2021年9月计算机二级MY sql模拟练习(7月1日)
1.有以下程序:
void funl(char*p)
{ char*q;
q=P;
while(*q!='\O')
{(*q)++;q++;}
}
main()
{ char a[]={"Program"),*P;
p=&a[3];funl(p);
printf("%s\n",a);
}
程序执行后的输出结果是( )。
A.Prohsbn
B.Prphsbn
C.Progsbn
D.Program
参考答案:A
2.若有以下的说明和语句,则在执行for语句后,’(*(pt+1)+2)表示的数组元素是( )。
int t[3][3],*pt[3],k;for(k=0;k<3;k++)pt[k]= &t[k][0];
A.t[2][0]
B.t[2][2]
C.t[1][2]
D.t[2][1]
参考答案:C
3.有以下程序:
main()
{ union
{ char ch[2];
int d;
}s;
s.d=0x4321;
printf("%x,%x\n",S.ch[0],S.ch[l]);
}
在16位编译系统上,程序执行后的输出结果是( )
A.21,43
B.43,21
C.43,00
D.21,00
参考答案:A
4.以下程序的输出结果是( )。
main()
{ int a=1,b;
for(b=1,b<=10;b++)
{ if(a>=8)break;
if(a%2==1){a+=5;continue;}
a=3;}
printf("%d\n",b);
A.3
B.4
C.5
D.6
参考答案:B
5.以下程序的输出结果是( )。
void prt(int*m.int n)
{int i;
for(i=0;i
main()
{ int a[]={1,2,3,4,5),i;
prt(a,5);
for(i=0;i<5;i++)
printf("%d,",a[i]);)
A.1,2,3,4,5
B.2,3,4,5,6
C.3,4,5,6,7
D.2,3,4,5,1
参考答案:B
以上就是“2021年9月计算机二级MY sql模拟练习(7月1日)”相关内容,小伙伴们快来了解一下吧。另外,大家可通过环球网校“ 免费预约短信提醒”及时获知2021年9月全国计算机等级考试准考证打印时间提醒。环球网校友情提示:为方便更多小伙伴备考,环球网校特地为您准备了计算机二级复习资料,如有需要请点击文章下方“免费下载>>>2021年计算机二级考试精华资料”下载学习。