网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
对下述程序的判断中,正确的是
#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"为止,输出连接在一起的字符串
参考答案
更多 “ 对下述程序的判断中,正确的是#includestdio.hvoid 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"为止,输出连接在一起的字符串 ” 相关考题
考题
下列程序的输出结果是______。 includef(char 8s){char *p=s;while(*p!='\0')p++;retur
下列程序的输出结果是______。# include<stdio.h>f(char 8s){ char *p=s; while(*p!='\0')p++; return(p-s);}main(){ printf("%d\n",f("ABCDEF"));}A.3B.6C.8D.0
考题
以下程序运行后的输出结果是( )。includechar*ss(char*s){char*p,t;P=s+1;t=*s;while(*p){ *(P-1)=*P;P++;}*(P-1)=t;return s;}main(){char*p,str[10]="abcdefgh";p=ss(str);printf("%s\n",p);}
考题
下列程序的执行结果是______。 in(f(char*s) { char*p=s; while(*p!='\0')p++; return(p-s); } main() { printf("%d\n",f("goodbye!")); }A.3B.6C.8D.0
考题
以下程序运行后,输出结果是______。includess(char*s){char *p=s; while(*.p)p++; retu
以下程序运行后,输出结果是______。#include<stdio.h>ss (char *s){ char *p=s; while(*.p)p++; return(p-s);}main(){ char *a="abded"; int i; i=ss((A); print ("%d\n",i);}A.8B.7C.6D.5
考题
请读程序: includef(char * s){cahr * p=s;while(* p!='\0')p++;return(p-s);}main(){
请读程序: # include<stdio.h> f(char * s) {cahr * p=s; while(* p!='\0')p++; return(p-s); } main() {printf("%d\n”,f("ABCDEF"));} 上面程序的输出结果是 ( )A.3B.6C.8D.0
考题
对下述程序的判断中,正确的是includevoid main(){char*p,s[128];p=S;while(strcmp(s,"
对下述程序的判断中,正确的是 #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"为止,输出连接在一起的字符串
考题
以下程序的输出结果是()。includeint fun (char*s){char *p=s;while (*p!='\0,) p++
以下程序的输出结果是( )。 #include<iostream.h> int fun (char*s) { char *p=s; while (*p!='\0,) p++: return (p-s): } void main() { cout<<fun (" ABCDEF ")<<endl: }A.3B.6C.8D.0
考题
以下程序运行后,输出结果是()includess(char*s){char*p=s; while(*p)p++ return(p-s);
以下程序运行后,输出结果是( ) #include<stdio.h> ss(char *s) { char*p=s; while(*p) p++ return(p-s); } main() { char *a="abded" int i; i=ss(a) ; printf("%d\n",i); }A.8B.7C.6D.5
考题
以下程序运行后的输出结果是______。 ss(char*s) { char*p=s; while(*p)p++; return(p-s); } main() { char*a="abded";int i; i=ss(a); printf("%d\n",i); }A.8B.7C.6D.5
考题
若有如下程序: void a(char*p,char c) {while(*p) { if(*p==c)*p=c-'b'+'B';; p++; } } main() {char s[50]="abcdeeffgee",b='e'; a(s,b);printf("%s\n",s); } 则程序运行后的输出结果是( )。A.AbcdeeffgeeB.ABCDeeFFGeeC.abcdEEffgEED.ABCDEEFFGEE
热门标签
最新试卷