单选题
C语言
题号 #150823
阅读下列程序,当运行函数时,输入asd af aa z67,则输出为
#include
#include
#include
int fun (char *str)
{ int i,j=0;
for(i=0;str[i]!=′\0′;i++)
if(str[i]!=′ ′)str[j++]=str[i];
str[j]= ′\0′;
}
main()
{
char str[81];
int n;
clrscr();
printf("Input a string : ");
gets(str);
puts(str);
fun(str);
printf("%s\n",str);
}
参考答案
A
答案解析
暂无解析
你可能感兴趣的试题
A.5
B.6
C.7
D.8
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);