题目内容

Directions: The following paragraphs are given in a wrong order. You are required to reorganize these paragraphs into a coherent article by choosing from the list A—G to fill in each number box. Paragraph C and F have been correctly placed.Thanksgiving - A Celebration of Gratitude

查看答案
更多问题

以下程序运行结果为______void main( ){ int i=1,n=3,j,k=3;int a[5]={1,4,5};while (i<=n && k>a[i])i++;for(j=n-1;j>=i;j--)a[j+1]=a[j];a[i]=k;for (i=0;i<=n;i++)printf(“%5d”,a[i]);}

A. 1 3 4 5
B. 1 2 3 4
C. 2 4 6 8
D. 1 3 5 7

下列定义数组的语句中正确的是( )。

A. int x[0...10];
B. int x[ ];
C. int N=10; Int x[N];
D.
E. define N 10int x[N];

有以下程序(strcat函数用于连接两个字符串):#include"stdio.h"#include"string.h"void main(){ char a[20]="ABCD\0EFG\0",b[]="IJK";strcat(a,b);printf("%s\n",a);}程序的运行结果( )。

A. IJK
B. A.ABCD\0EFG\0IJK
C. ABCDIJK
D. EFGIJK

若有说明:char s[20];,如果想从键盘上把字符串:This is a book. 输入到数组s中,应当使用的函数调用语句的形式是( ) 。

答案查题题库