有以下程序: include<stclio.h> main() { char c; while((c=getchar())!=?)pu
有以下程序: include<stclio.h> main() { char c; while((c=getchar())!=?)putchar(--c); } 程序运行时,如果从键盘输入:Y?N?<回车>,则输出结果为【 】。
X
主函数中首先定义了一个字符型变量c,接着执行下面while语句,在while循环中,首先从键盘上读入一个字符Y并给赋给字符变量c,赋值表达式的值不为"?",执行输出语句,输出字符X。接着判断while中的循环条件,读入一个字符"?"并赋值给c,赋值表达式的值为"?"循环条件不再满足,退出循环。