若运行时从键盘上输入OPEN THE DOOR,以下程序的输出结果是( )。 char fun(char*C){if(*e<=’Z’&&*c>=’A’) *c一=’A’一’a’: return*c;} main(){char s[81],*p=s; ge

admin2017-10-24  20

问题 若运行时从键盘上输入OPEN THE DOOR,以下程序的输出结果是(  )。
char fun(char*C){if(*e<=’Z’&&*c>=’A’)
*c一=’A’一’a’:
return*c;}
main(){char s[81],*p=s;
gets(s);
while(*P){
*p=fun(p);
putchar(*P);
p++;}
prinnf(’’\n’’);}

选项 A、OPEN THE DOOR
B、open the door
C、oPEN tHE dOOR
D、Open The Door

答案B

解析 题目中函数fun的主要功能是判断字符是否为大写字符,如果是则转换为小写字符,主函数读入大写字符串,转换成小写,所以输出结果应该是全部小写的字符串。
转载请注明原文地址:https://kaotiyun.com/show/NIxp777K
0

随机试题
最新回复(0)