下面程序的输出是:#include<stdio.h>main(){char*a="1234";fun(a);printf("\n");}fun(char*s){chart;if(*s){t=*s++;fun(s);}if(t!='\0')putchar(t);}
A. 1234
B. 4321
C. 1324
D. 4231
若有以下定义:main(){int(*a)(),*b(),w[10],c;┇}fun(int*c){…}对fun函数的正确调用语句是:
A. a=fun;a(w);
B. a=fun;(*a)(&c);
C. b=fun;*b(w);
D. fun(b);
下面程序的输出是:main(){chara[]="ABCDEFG",k,*p;fun(a,0,2);fun(a,4,6);printf("%s\n",a);}fun(char*s,intp1,intp2){charc;while(p1<p2){c=s[p1];s[p1]=s[p2];s[p2]=c;p1++;p2--;}}
ABCDEFG
B. DEFGABC
C. GFEDCBA
D. CBADGFE
下面程序的输出是:main(){char*s="wbckaaakcbw";inta=0,b=0,c=0,x=0,k;for(;*s;s++)switch(*s){case'c':c++;case'b':b++;default:a++;case'a':x++;}printf("a=%d,b=%d,c=%d,x=%d\n",a,b,c,x);}
A. a=8,b=4,c=2,x=11
B. a=4,b=2,c=2,x=3
C. a=8,b=4,c=2,x=3
D. a=4,b=4,c=2,x=3