对下述程序的判断中,正确的是 #include<stdio.h> void main() { char*p,s[128]; p=S; while(strcmp(s,"End")) { printf("Input a string:");gets(s); while(*p) putchar(*p++);}}
A.此程序循环接收字符串并输出,直到接收字符串"End"为止
B.此程序循环接收字符串,接收到字符串"End"则输出,否则程序终止
C.此程序循环接收字符串并输出,直到接收字符串"End"为止,但因为代码有错误,程序不能正常工作
D.此程序循环接收字符串并将其连接在一起,直到接收字符串"End"为止,输出连接在一起的字符串
[单选题]对下述程序的判断中,正确的是()。includevoid main(){char *P,s[256];p=s;while(strcmp对下述程序的判断中,正确的是( )。 #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.此程序循环接收字符串并输出,
[单选题]对下述程序的判断中,正确的是 void main() { char*p,s[128]; p=s; while(strcmp(s,"End")) { printf("Input a string:"); gets(s); while(*p) putchar(*p++);}}A.此程序循环接收字符串并输出,直到接收字符串"End"为止B.此程序循环接收字符串,接收到字符串"End"则输出,否则程序终止C.此程序循环接收字符串并输出,直到接收字符串"End"为止,但因为代码有错误,
[单选题]下述程序的输出结果是()。includevoid main(){char a=1,b=2;char c=a^b<<2;printf("/n%下述程序的输出结果是( )。 #include<stdio.h> void main() {char a=1,b=2; char c=a^b<<2; printf("/n%d",C); }A.9B.10C.12D.2
[单选题]下述程序的输出结果是()。includevoid main(){char a=3,b=1;char c=a^b<<2;printf("%d"下述程序的输出结果是( )。 #include<stdio.h> void main() {char a=3,b=1; char c=a^b<<2; printf("%d",C; }A.1B.7C.3D.2
[单选题]有以下程序includeincludevoid main( ){char*p="abcde/0fghjik/0"; cou有以下程序 #include<string.h> #include<iostream.h> void main( ) { char*p="abcde/0fghjik/0"; cout<<strlen(p);} 程序运行后的输出结果是A.12B.15C.6D.5
[单选题]有以下程序:includeincludevoid main( ){char * p="abcde/0fghjik/0";c有以下程序: #include<string.h> #include<iostream.h> void main( ) { char * p="abcde/0fghjik/0"; cout < < strlen(p) ;} 程序运行后的输出结果是A.12B.15C.6D.5
[单选题]如下程序:includevoid main(){char str[2][5]={"1234","5678"),*p[2];int i,j,s=0;如下程序: #include<iostream.h> void main() { char str[2][5]={"1234","5678"),*p[2]; int i,j,s=0; for(i=0;i<2;i++)p[i]=str[i]; for(i=0;i<2;i++) for(j=0;p[i][j]>'/0';j+=2) s=
[单选题]下面程序的运行结果为()。includevoid main(){char a=‘3’;switch(A) {case’3’:cout<下面程序的运行结果为( )。 #include<iostream.h> void main() { char a=‘3’; switch(A) { case’3’:cout<<“3”; case’2’:cout<<“2”;break; default:cout<<“1”; } }A.3B.321C.31D.32
[单选题]下列程序的输出结果为includevoid main( ){char * a[ ]={"hello","the","world"};c下列程序的输出结果为 #include<iostream.h> void main( ) { char * a[ ]={"hello","the","world"}; char * * pa=a; pa++; cout <<*pa<<end1; }A.helloB.theC.worldD.hellotheworld
[单选题]下列程序的输出结果为includevoid main(){char*a[]={"hello","the","world"};char*下列程序的输出结果为 #include<iostream.h> void main() { char*a[]={"hello","the","world"}; char**pa=a; pa++; cout<<*pa<<end1; }A.helloB.theC.worldD.hello the world