问题
单项选择题
有以下程序
#include<stdio.h>
char fun(char*c)
if(*c<=’Z’&&*c>=’A’)
*c-=’A’-’a’;
return*c;
main()
char s[81],*p=s;
gets(s);
while(*p)
*p=fun(p);
putchar(*p);
p++;
printf("\n");
若运行时从键盘上输入OPEN THE DOOR<回车>,程序的输出结果是______。
A.open the door
B.oPEN tHE dOOR
C.OPEN THE DOOR
D.Open The Door
答案
参考答案:A
解析: 函数fun功能将大写字符转换为小写字符。所以选择A。