网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
int a[3][4]={{1},{5},{9}}; 它的作用是将数组各行第一列 的元素赋初值,其余元素值为0.
参考答案
更多 “int a[3][4]={{1},{5},{9}}; 它的作用是将数组各行第一列 的元素赋初值,其余元素值为0.” 相关考题
考题
有以下程序struct S{ int n; int a[20]; };void f(int *a,int n){ int i;for(i=0;in-1;i++) a[i]+=i;}main( ){ int i; struct S s={10,{2,3,1,6,8,7,5,4,10,9}};f(s.a,s.n);for(i=0;is.n;i++) printf("%d",s.a[i]);}程序运行后的输出结果是A)2,4,3,9,12,12,11,11,18,9,B)3,4,2,7,9,8,6,5,11,10,C)2,3,1,6,8,7,5,4,10,9,D)1,2,3,6,8,7,5,4,10,9,
考题
有以下程序#include stdio.hvoid fun( int a, int b){ int t;t=a; a=b; b=t;}main(){ int c[10]={1,2,3,4,5,6,7,8,9,0},i;for(i=0;i10;i+=2) fun(c[i], c[i+1]);for(i=0;i10;i++) printf("%d," ,c[i]);printf("\n");}程序的运行结果是A)1,2,3,4,5,6,7,8,9,0,B)2,1,4,3,6,5,8,7,0,9,C)0,9,8,7,6,5,4,3,2,1,D)0,1,2,3,4,5,6,7,8,9,
考题
有以下程序struct S{ int n; int a[20]; }; void f(int *a,int n) {int i; for(i=0;i a[i]+=i; } main() {int i; struct S s={10,{2,3,1,6,8,7,5,4,10,9}}; f(s.a, s.n); for(i=0;i printf(“%d”,s.a[i]); } 程序运行后的输出结果是( )。A.2,4,3,9,12,12,11,11,18,9,B.3,4,2,7,9,8,6,5,11,10,C.2,3,1,6,8,7,5,4,10,9,D.1,2,3,6,8,7,5,4,10,9,
考题
有以下程序: struct S{int n;int a[20];}; void f(int*a,int n) {int i; for(i=0;i<n-1;i++)a[i]+=i;} mainf() {int i;struct S s{10,{2,3,1,6,8,7,5,4,10,9}}; if(s.a,s.n); for(i=0;i<s.n;i++)printf("%d",s.a[i]);} 程序运行后的输出结果是( )。A.2,4,3,9,12,12,11,11,18,9B.3,4,2,7,9,8,6,5,11,10C.2,3,1,6,8,7,5,4,10,9D.1,2,3,6,8,7,5,4,10,9
考题
有以下程序 struct S { int n;int a[20];}; void f(int *a,int n) { int i; for(i=0;i<n-1;i++)a[i]+=i; } main() { int i;struct S s={10,{2,3,1,6,8,7,5,4,10,9}}; f(s.a,s.n); for(i=0;i<s.n;i++)printf("%d,",s.a[i]); } 程序运行后的输出结果是A.2,4,3,9,12,12,11,11,18,9,B.3,4,2,7,9,8,6,5,11,10,C.2,3,1,6,8,7,5,4,10,9,D.1,2,3,6,8,7,5,4,10,9,
考题
以下程序的输出结果是 () include int a [3] [3]={1,2,3,4,5,6,7,8,9},*p; main()
以下程序的输出结果是 ( ) #include<stdlib.h> int a [3] [3]={1,2,3,4,5,6,7,8,9},*p; main( ) { p=(int *)malloc(sizeof(int)); f(p,a); printf("%d\n",*p); } f(int *s,intp[][3]) { *s=p[1][1]; }A.1B.4C.7D.5
考题
定义如下变量和数组: int i; int x[3][3]={1,2,3,4,5,6,7,8,9}; 则下面语句的输出结果是( )。 for(i=0; i<3; i++) printf("%d",x[i][2-i]);A.1 5 9B.1 4 7C.3 5 7D.3 6 9
考题
下面程序的结果为#includevoid main(){ int i;int a[3][3]={1,2,3,4,5,6,7,8,9};for(i=0;i 3;i++)cout }A.1 5 9B.7 5 3C.3 5 7D.5 9 1
考题
下面程序输出的结果是main(){ int i;int a[3][3]={1,2,3,4,5,6,7,8,9};for(i=0;i3;i++)printf("%d ",a[2-i][i]);}A.1 5 9B.7 5 3C.3 5 7D.5 9 1
考题
定义如下变量和数组:int k;int a[3][3]={9,8,7,6,5,4,3,2,1};则下面语句的输出结果是for(k=0;k3;k++)printf("%d",a[k][k]);A.7 5 3B.9 5 1C.9 6 3D.7 4 1
考题
下列二维数组初始化语句中,不正确的是( )。A.int b[][5]={2,9,6,0,8,7,4};B.int b[3][5]={0,0,9}C.int b[][4]={{3,9},{7,6,8},{2}};D.int b[3)[2]={(8,4),(2,1),(5,9)};
考题
以下程序的输出结果是includeint a[3][3]={1,2,3,4,5,6,7,8,9,},*p;main(){p=(int*)ma
以下程序的输出结果是 #include<stdio.h> int a[3][3]={1,2,3,4,5,6,7,8,9,},*p; main() { p=(int*)malloc(sizeof(int)); f(p,a); printf("%d\n",*p); free(p);} f(int *s, int p[][3]) { *s=p[1][1];}A.1B.4C.7D.5
考题
下面程序输出的结果是 main() { int int a[3)[3]={1,2,3,4,5,6,7,8,9}; for(i=0;i<3;i++) printf("%d",a[2-i][i]);}A.1 5 9B.7 5 3C.3 5 7D.5 9 1
考题
有以下程序 include void fun(int a, int b) {int t; t=a; a=b;
有以下程序 #include<stdio.h> void fun(int a, int b) {int t; t=a; a=b; } int c[10]={1,2,3,4,5,6,7,8,9,0},i; for(i=0;i<10;i+=2) fun(c[i],c[i+1]); for(i=0;i<10;i++) printf("%d,",c[i]); printf("\n"); } 程序的运行结果是______。A.1,2,3,4,5,6.7,8,9,0,B.2,1.4.3.6,5.8,7,0,9,C.0,9,8,7,6,5,4,3,2,1,D.0,1,2,3,4,5,6,7,8,9,
考题
以下程序的输出结果是includeint a[3][3]={1,2,3,4,5,6,7,8,9,},*p;main(){p=(int*)ma
以下程序的输出结果是 #include<stdio.h> int a[3][3]={1,2,3,4,5,6,7,8,9,},*p; main() { p=(int*)malloc(sizeof(int)); f(p,a); printf("%d\n”,*p); free(p);} f(int *s,intp [][3]) { *s=p[1][1];}A.1B.4C.7D.5
考题
下面程序输出的结果是includevoid main( ){ int i;int a[3][3]={1,2,3,4,5,6,7,8,9
下面程序输出的结果是 #include<iostream.h> void main( ) { int i; int a[3][3]={1,2,3,4,5,6,7,8,9}; for(i=0;<3;i++) cout << a[2-i][i]<<" "; }A.1 5 9B.7 5 3C.3 5 7D.5 9 1
考题
下面程序输出的结果是()includevoid main(){inti:int a[3][3]={1,2,3,4,5,6,7,8,9}
下面程序输出的结果是( ) #include<iostreas.h> void main() {inti: int a[3] [3]={1,2,3,4,5,6,7,8,9}; for(i=0;i<3;i++= cout<<a [i] [i]<<" ";}A.1 5 9B.7 5 3C.3 5 7D.5 9 1
考题
下面程序输出的结果是includevoid main(){ int i; int a[3][3]={1,2,3,4,5,6,7,8,9
下面程序输出的结果是 #include<iostream.h> void main() { int i; int a[3][3]={1,2,3,4,5,6,7,8,9}; for(i=0;<3;i++) cout<<a[2-i][i]<<" "; }A.1 5 9B.7 5 3C.3 5 7D.5 91
考题
以下程序的输出结果是#includeint a[3][3]={1,2,3,4,5,6,7,8,9,},*p;main( ){ p=(int *)malloc(sized(int));f(p,a) ;printf("%d\n",*p);free(p);}f(int *s,int p[ ][3]){ *s=p[1][1];}A.1B.4C.7D.5
考题
下面程序输出的结果是 include void main( ) { int i; int a[3][3]={1,2,
下面程序输出的结果是 #include<iostream.h> void main( ) { int i; int a[3][3]={1,2,3,4,5,6,7,8,9}; for(i=0;i<3;i++) cout<<a[i][i]<<" ";}A.1 5 9B.7 5 3C.3 5 7D.5 9 1
考题
以下程序的输出结果是#includestdio.hint a[3][3]={1,2,3,4,5,6,7,8,9,},*p;main(){ p=(int*)malloc(sizeof(int));f(p,a);printf("%d\n",*p);free(p); }f(int *s, int p[][3]){ *s=p[1][1];}A.1B.4C.7D.5
考题
若有以下程序: inclcude void main(){int i;int a[3] [3]= { 1,2,3,4,5,6,7,8,9 };
若有以下程序:# inclcude <iostream.h>void main(){int i;int a[3] [3]= { 1,2,3,4,5,6,7,8,9 };for(i=0;i<3;i++)cout<<a[2-i] [i]<<" ";cout<<end1;}执行后的输出结果是( )。A.1 5 9B.7 5 3C.3 5 7D.5 9 1
考题
以下程序段的输出结果是 ______。 int i; int x[3][3]={1,2,3,4,5,6,7,8,9}; for(i=0;i<3;i++) cout<<x[i][2-i]<<‘ ’;A.1 5 9B.1 4 7C.3 5 7D.3 6 9
考题
有以下程序: void sott(int a[], int n) { int i, j, t; for(i=0; i<n-1; i++) for(j=i+1; j<n; j++) if(a[i]<a[j]){t=a[i];a[i]=a[j];a[j]=t;) } main() {int aa[10]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, I; sort(aa+2, 5); for (i=0; i<10; i++)printf("% d", aa[i]); printf("\n"); } 程序运行后的输出结果是______。A.1, 2, 3, 4, 5, 6, 7, 8, 9, 10,B.1, 2, 7, 6, 3, 4, 5, 8, 9, 10,C.1, 2, 7, 6, 5, 4, 3, 8, 9, 10,D.1, 2, 9, 8, 7, 6, 5, 4, 3, 10,
考题
单选题若有以下程序#include void fun(int a[],int n){ int t,i,j; for(i=1;i for(j=i+2;j if(a[i]a[j]) { t=a[i]; a[i]=a[j]; a[j]=t; }}main(){ int c[10]={10,9,8,7,6,5,4,3,2,1},i; fun(c,10); for(i=0;i printf("");}则程序的输出结果是( )。A
2,9,4,7,6,5,8,3,10,1,B
10,9,8,7,6,5,4,3,2,1,C
10,1,8,3,6,5,4,7,2,9,D
1,10,3,8,5,6,7,4,9,2,
考题
单选题有以下程序:#include void fun(int a,int b){ int t; t=a; a=b; b=t;}main(){ int c[10]={1,2,3,4,5,6,7,8,9,0},i; for(i=0;i10;i+=2)fun(c[i],c[i+1]); for(i=0;i10;i++)printf(%d,,c[i]); printf();}程序运行的结果是( )。A
1,2,3,4,5,6,7,8,9,0,B
2,1,4,3,6,5,8,7,0,9,C
0,9,8,7,6,5,4,3,2,1,D
0,1,2,3,4,5,6,7,8,9,
考题
单选题有以下程序#include struct S{ int n; int a[20];};void f(int *a, int n){ int i; for(i=0;i
A
1,2,3,6,8,7,5,4,10,9,B
3,4,2,7,9,8,6,5,11,10,C
2,3,1,6,8,7,5,4,10,9,D
2,4,3,9,12,12,11,11,18,9
热门标签
最新试卷