网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
若输入bcdefgh、m、abcdefg,以下程序的输出结果为()。includeincludemain(){i

若输入bcdefgh、m、abcdefg,以下程序的输出结果为( )。 #include<stdio.h> #include<string.h> main() { int i; char string[20],str[3][20]; for(i=0;i<3;i++)gets(str[i]); if(strcmp(str[0],str[1])>0) strcpy(string,str[0]); else strcpy(string,str[1]); if(strcmp(str[2],string)>0) strcpy(string,str[2]); printf("%s",string); }

A.bcdefgh

B.m

C.abcdefg

D.bcdefgh或abcdefg


参考答案

更多 “ 若输入bcdefgh、m、abcdefg,以下程序的输出结果为()。includeincludemain(){i 若输入bcdefgh、m、abcdefg,以下程序的输出结果为( )。 #include<stdio.h> #include<string.h> main() { int i; char string[20],str[3][20]; for(i=0;i<3;i++)gets(str[i]); if(strcmp(str[0],str[1])>0) strcpy(string,str[0]); else strcpy(string,str[1]); if(strcmp(str[2],string)>0) strcpy(string,str[2]); printf("%s",string); }A.bcdefghB.mC.abcdefgD.bcdefgh或abcdefg ” 相关考题
考题 阅读下列程序,当运行函数时,输入asd af aa z67,则输出为include include i 阅读下列程序,当运行函数时,输入asd af aa z67,则输出为 #include <stdio.h> #include <ctype.h> #include <string.h> int fun(char*str) { int i,j=0; for(i=0;str[i]!='\0';i++) if(str[i]!='')str[j++]=str[i]; str[j]='\0'; } main() { char str[81];A.asdafaaz67B.asdafaa267C.asdD.z67

考题 有以下程序:includeincludemain() {char c[6];int i=0;for(;j 有以下程序:#include<stdio.h>#include<stdio.h>main() { char c[6]; int i=0; for(;j<6;c[i]=getchar(),i++); for(i=0;i<6;i++)putchar(c[i]); printf("\n");}如果从键盘上输入:ab<回车>c<回车>def<回车>则输出结果为 ______。A.a b c d e fB.a b c dC.ab c dD.abcdef

考题 以下程序的输出结果是()includeincludemain(){char str[12]={'s','t','r', 以下程序的输出结果是( ) #include<stdio.h> #include<string.h> main() {char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str)); }A.6B.7C.11D.12

考题 以下程序的输出结果是()。includeinclude main(){char str[12]={'s','t','r 以下程序的输出结果是( )。 #include <stdio.h> #include <string.h> main() { char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str) ); }A.6B.7C.11D.12

考题 若输入bcdefgh、m、abcdefg,以下程序的输出结果为( )。A)bcdefghB)mC)abcdefgD)bcdefgh abcdefg

考题 以下程序的输出结果是includeincludemain(){ char b1[8]=“abcdefg”,b2[8], 以下程序的输出结果是 #include<stdio.h> #include<string.h> main() { char b1[8]=“abcdefg”,b2[8],*pb=b1+3; while(--pb>=b1)strcpy(b2,pb) ; printf(“%d\n”,strlen(b2)); }A.8B.3C.1D.7

考题 当执行下面的程序时,如果输入ABC,写出程序输出结果 #include "stdio.h" #include "string.h" main() { char ss[10]; gets(ss); strcat(ss,"6789"); printf("%sn",ss); }

考题 以下程序运行后的输出结果是() 。   #include <stdio.h>   #include <stdlib.h>   #include <string.h>   main()   { char *p; int i;    p=(char *)malloc(sizeof(char)*20);    strcpy(p,"welcome");    for(i=6;i>=0;i--) putchar(*(p+i));    printf("n"); free(p);   }

考题 有以下程序,当输入数据为:12.5时,程序输出结果是()。 #include "stdio.h" main() { int a; scanf("%d",a); printf("a=%dn",a); }