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

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

以下数组定义中错误的是

A)int x[][3]={0};

B)int x[2][3]={{l,2},{3,4},{5,6}};

C)int x[][3]={{l,2,3},{4,5,6}};

D)int x[2][3]={l,2,3,4,5,6};


参考答案

更多 “ 以下数组定义中错误的是A)int x[][3]={0};B)int x[2][3]={{l,2},{3,4},{5,6}};C)int x[][3]={{l,2,3},{4,5,6}};D)int x[2][3]={l,2,3,4,5,6}; ” 相关考题
考题 设有数组定义int[][]x={{1,2},{3,4,5},{6},{}};,则x.length的值为()A.3B.4C.6D.7

考题 对于局部变量整型切片x的赋值,下面定义正确的是() A.x := []int{1, 2, 3,4, 5, 6,}B.x := []int{1, 2, 3,4, 5, 6}C.x := []int{1, 2, 3,4, 5, 6}D.x := []int{1, 2, 3, 4, 5, 6,}

考题 下面程序段的输出结果是 public class Test{ public static void main(String args[]){ int x,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2; if(x>y) System.out.println("x>y"); else if(x==y) System.out.println("x=y"); else System.out.println("x<y"); } }A.x>yB.x=yC.x<yD.编译错误

考题 下面程序段的输出结果是( )。 publicclassTest{ publicstaticvoidmain(Stringargs[]){ intx,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; Y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2; if(x>y) System.out.println9"x>y"); elseif(x==y) System.out.println("x=y"); else System.out.println("x<y"); } }A.x>yB.x=yC.x<yD.编译错误

考题 下面程序段的输出结果是______。 public class Test{ public static void main(String args[ ]){ int x,y; x=(int)Math.sqrt(5/2)+(int)Math.random( )*5/2; y=(int)Math.sqrt(3/2)+(int)Math.random( )*3/2; if(x>y) System.out.println("x>y"); else if(x==y) System.out.println("x=y"); else System.out.println("x<y"); } }A.x>yB.x=yC.x<yD.编译错误

考题 设x、y、z均为int型变量,则执行以下语句后,x、y, z的值为( ) X=1; y=0; Z=2; y++++Z ||++ X;A.2、l、3B.2、0、3C.2、l、3D.2、1、2

考题 以下程序中,fun函数的功能足求3行4列二维数组每行尢素中的最大值。请填空。 void fun(int,int,int(*)[4],int*); main() {int a[3][4]={{12,41,36,28},{19,33,15,27},{3,27,19,1}},b[3],i; fun(3,4,a,B); for(i=0;j<3;i++)printf("%4d",b[i]); printf("\n"); } void fun(int m,int n,int ar[][4],int*br) {int i,j,x; for(i=0;i<m;i++) {x=ar[i][0]; for(j=0;j<n;j++) if(( )) x=ar[i][j]; br[i]=x; } }

考题 3、假设int类型变量占用4个字节,定义数组 int x[10] = {0,2,4}; 则x在内存中占据几个字节?

考题 假定int类型变量占用4个字节,若有定义:int[] x = new int[] {1,2,3,4,5,6}; 则数组x在内存中所占字节数是()。A.4B.12C.24D.48

考题 设要定义一个包含2个输入参数和2个输出参数的存储过程,各参数均为整型。下列定义该存储过程的语句,正确的是A.CREATE PROC P1 @x1, @x2 int, @x3 , @x4 int outputB.CREATE PROC P1 @x1 int, @x2 int, @x2, @x4 int outputC.CREATE PROC P1 @x1 int, @x2 int, @x3 int, @x4 int outputD.CREATE PROC P1 @x1 int, @x2 int, @x3 int output, @x4 int output t