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

题目内容 (请给出正确答案)

若输入“abcdef”“abdef”,下述程序的输出结果为( )。 #include<stdio.h> #include<string.h> main { int n; char s1[20],s2[20],*p1,*p2; scanf("%s",s1); scanf("%S",s2); p1=s1; p2=s2; n=strcmp(p1,p2); printf("Vood\n",n); }

A. -1

B.0

C."abcdef"

D."abdef"


参考答案

更多 “ 若输入“abcdef”“abdef”,下述程序的输出结果为( )。 #includestdio.h #includestring.h main { int n; char s1[20],s2[20],*p1,*p2; scanf("%s",s1); scanf("%S",s2); p1=s1; p2=s2; n=strcmp(p1,p2); printf("Vood\n",n); }A. -1B.0C."abcdef"D."abdef" ” 相关考题
考题 以下程序运行后,如果从键盘上输入ABCDEF,则输出结果为______。includeinclude 以下程序运行后,如果从键盘上输入ABCDEF<回车>,则输出结果为______。 #include<stdio.h> #include<string.h> func(char str[]) { int num=0; while(*(str+num)!='\0') num++; return(num);p } main() { char str[10],*p=str; gets(p);printf("%d\n",func(P)); }A.8B.7C.6D.5

考题 若程序执行时的输入数据是"2473",则下述程序的输出结果是includevoid main(){int cs;w 若程序执行时的输入数据是"2473",则下述程序的输出结果是 #include<stdio.h> void main() { int cs; while((cs=getchar())!=,'\n') {switch(cs='2') { case0 case 1:putchar(cs+4); case 2:putchar(cs+4); break; case 3:putchar(cs+3);default:putchar(cs+2);}}}A.668977B.668966C.6677877D.6688766

考题 若执行下述程序时,从键盘输入的数据是3和6,则程序的输出结果是()。includevoid main(){ 若执行下述程序时,从键盘输入的数据是3和6,则程序的输出结果是( )。 #include <stdio.h> void main() {int x,y,z; scanf("%d%d",X,y); z = y + x; if (x<y) z = y + x; printf("%d",z); }A.9B.3C.0D.有语法错误

考题 有以下程序程序运行后的输出结果是( )A.AbCdEfB.ABCDEFC.aBcDeFD.abcdef

考题 有以下程序:程序运行后的输出结果是( )。A.AbcdefB.ABCDEFC.aBcDeFD.AbCdEf

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

考题 若输入“abcdef”、“abdef”,以下程序的输出结果为( )#includeA)1B)0C)’abcdeff’D)’abdef’

考题 若程序执行时的输入数据是“2473”,则下述程序的输出结果是includevoid main(){int cs; 若程序执行时的输入数据是“2473”,则下述程序的输出结果是 #include<stdio.h> void main() { int cs; while((cs=getchar())!=;'\n') {switch(cs-'2') { case 0 case 1:putchar(cs+4); case 2:putchar(cs+4); break; case 3:putchar(cs+3);default:putchar(cs+2),}}}A.668977B.668966C.6677877D.6688766

考题 若输入“abcdef”“abdef”,下述程序的输出结果为( )。#include#includemain{int n;char s1[20],s2[20],*p1,*p2;scanf(%s,s1);scanf(%S,s2);p1=s1;p2=s2;n=strcmp(p1,p2);printf(Vood\n,n); }A.-1B.0C.abcdefD.abdef