阅读下列程序 当运行函数时 输入asdafaaz67 则输出为 #include #include #include intf

计算机 函数,程序, 已帮助 人

阅读下列程序,当运行函数时,输入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.asdafaaz67

B.asd af aa z67

C.asd

D.z67

请帮忙给出正确答案和分析,谢谢!

热搜:一个c程序的执行是从本程序的main函数开始