题目内容

若有以下程序 #include main() { char a[20], b[ ]="The sky is blue."; int i; for (i=0; i<7; i++) scanf("%c", &b[i]); gets(a); printf("%s%s\n", a,b); } 执行时若输入: (其中表示回车符)Fig flower is red. 则输出结果是

A. wer is red.Fig flo is blue.
B. wer is red.Fig flo
C. wer is red.The sky is blue.
D. Fig flower is red.The sky is blue.

查看答案
更多问题

有以下程序 #include main() { char ss[3][5]={"aaaa","bbbb","cccc"}; int i=0; do { ss[i][++i]=0; } while( i<3 ); do { puts(ss[i-1]); } while( --i>0 ); } 执行后的输出结果是

A. ccc bb a
B. aaa bb c
C. a bb ccc
D. c00 b00 a00

有以下程序 #include main() { char s[][6]={"abcd","abc","ab"}; int i; for( i=0;i<3;i++ ) puts(s[i]); } 执行后的输出结果是

A. abcdabcab
B. abcdbcdcd
C. abc
D. aaa

有以下程序#include main( ){ char b[4][10], c; int i,j; for (i=0; i<4; i++) { j = 0; while ((c=getchar())!=' ' && c!='\n') b[i][j++] = c; b[i][j] = '\0'; } printf("%s%s%s%s\n", b[0], b[1], b[2], b[3]); } 程序运行时从第一列开始输入:Peach flower is pink.<回车> 则输出结果是

A. Peachflowerispink.
B. Peachfloweris pink.
C. Peachflower is pink.
D. Peach flower is pink.

有以下程序#include main( ){ char w[20], a[5][10]={"abcde", "fghij", "klmno", "pqrst", "uvwxy"}; int i; for ( i=0; i<5; i++ ) w[i] = a[i][i]; w[5]= '\0'; printf( "%s\n", w );} 程序运行后的输出结果是

A. ejoty
B. afkpu
C. agmsy
D. eimqu

答案查题题库