题目内容

若有以下程序:#includeint 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);return 0;}执行时若输入:(其中表示回车符)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.

查看答案
更多问题

以下叙述中正确的是

A. 在语句char str[]="string!;中,数组str的大小等于字符串的长度
B. 语句char str[10]="string!"; 和char str[10]={"string!"}; 并不等价
C. 对于一维字符数组,不能使用字符串常量来赋初值
D. 对于字符串常量“string!”,系统已自动在最后加入了‘\0’,表示串结尾

有以下程序:#include#includeint main(){char s[5][8]={"red","yellow","green","blue","white"};int i,j; char t[8];for(i=0;i<4;i++)for(j=i+1;j<5;j++)if(strlen(s[i])

A. red
B. white
C. yellow
D. green

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

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

Listen to a conversation between two friends about pollution and choose the best answer to each of the questions.1. Which of the following is true about Porthcawl?[音频]

A. It is by the sea.
B. The man lives there.
C. It is a place with dirty air.
D. It is a town on the north coast of Wales.

答案查题题库