单选题 对下述程序的判断中,正确的是 ____
#include<stdio.h>
void main()
{char *P,s[256];
p=s;
while(strcmp(s,"the end"))
{printf("Input the string:");
gets(s);
while(*P)
putchar(*p++);}}
【正确答案】 A
【答案解析】[解析] strcmp(str1,str2)是比较字符串str1和sir2,当两字符串相等时,返回值为0,不相等时返回值为非0;所以此段程序的功能是在未接收到字符串“the end”时,读入字符并输出。