问题
单项选择题
下面程序的运行结果是( )。
#include<ctype.h>
fun(char *p)
int i,t; char ts[8];
for(i=0,t=0;p[i]!='\0';i+=2)
if(!isspace(*p+i)&&(*(p+i)!='a'))
ts[t++]=toupper(p[i]);
ts[t]='\0 ';
strcpy(p,ts);
main()
char str[81]="a b c d ef g");
fun(str);
puts(str);
A.abcdeg
B.bcde
C.ABCDE
D.BCDE
答案
参考答案:D