39) 若有以下调用语句,则不正确的fun函数的首部是
A) void fun(int m, int x[]) B) void fun(int s, int h[41])
C) void fun(int p, int *s) D) void fun(int n, int a)
main()
{ …
int a[50],n;
…
fun(n, &a[9]);
…
}
(40) 语句printf("a\bre\'hi\'y\\\bou\n");的输出结果是
A) a\bre\'hi\'y\\\bou B) a\bre\'hi\'y\bou
C) re'hi'you D) abre'hi'y\bou
(说明:'\b'是退格符)
(41) 请选出正确的程序段
A) int *p; B) int *s, k;
scanf("%d",p); *s=100;
… …
C) int *s, k; D) int *s, k;
char *p, c; char *p, e;
s=&k; s=&k;
p=&c; p=&c;
*p='a'; s=p;
… *s=1;
…
(42) 已知指针p的指向如下图所示,则执行语句 *--p;后*p的值是
A) 30 B) 20 C) 19 D) 29
a[0] a[1] a[2] a[3] a[4]
┌──┬──┬──┬──┬──┐
│ 10 │ 20 │ 30 │ 40 │ 50 │
└──┴──┴──┴──┴──┘
(43) 设已有定义: char *st="how are you" 下列程序段中正确的是
A) char a[11], *p; strcpy(p=a+1,&st[4]);
B) char a[11]; strcpy(++a, st);
C) char a[11]; strcpy(a, st);
D) char a[], *p; strcpy(p=&a[1],st+2);
(44) 下列程序执行后的输出结果是
A) you&ne B) you C) me D) err
mai()
{ char arr[2][4];
strcpy(arr,"you"); strcpy(arr[1],"me");
arr[0][3]='&';
printf("%s \n",arr);
}
(45) 下列程序执行后的输出结果是
A) hello B) hel C) hlo D) hlm
void func1(int i);
void func2(int i);
char st[]="hello,friend!"
void func1(int i)
{ printf("%c",st[i]);
if(i<3){i+=2;func2(i);}
}
void func2(int i)
{ printf("%c",st[i]);
if(i<3){i+=2;func1(i);}
}
main()
{ int i=0; func1(i); printf("\n");}
| 广告合作:400-664-0084 全国热线:400-664-0084 Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号 珠峰网 版权所有 All Rights Reserved
|