问题
单项选择题
设有如下函数定义,则输出结果为______。 char*fun (char*str) {char*p=str; while(*p) { if(*p>'d') continue;p++;} return p; } main() { printf("%s\n",fun("welcome!")); }
A.welcome!
B.come!
C.w
D.程序陷入死循环中
答案
参考答案:D
设有如下函数定义,则输出结果为______。 char*fun (char*str) {char*p=str; while(*p) { if(*p>'d') continue;p++;} return p; } main() { printf("%s\n",fun("welcome!")); }
A.welcome!
B.come!
C.w
D.程序陷入死循环中
参考答案:D