阿摩線上測驗 登入

試題詳解

試卷:102年 - 2013年3月计算机等级考试— 二级—《C语言 》上机题库 #13703 | 科目:计算机等级考试— 二级—《C语言 》

試卷資訊

試卷名稱:102年 - 2013年3月计算机等级考试— 二级—《C语言 》上机题库 #13703

年份:102年

科目:计算机等级考试— 二级—《C语言 》

33)阅读下列程序,当运行函数时,输入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; 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
正確答案:登入後查看