更多“( 25 )下列选项中,能正确定义数组的语句是A ) int num[0..2008] ;B ) int num[] ;C ) int N=2008 ”相关问题
  • 第1题:

    下列数组初始化语句哪些是正确的

    A.int[] nums = new int[]{0,1,2,3,4}

    B.int[] nums2 = {0,1,2,3,4,5}

    C.int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}}

    D.int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}}


    int[] nums = new int[]{0,1,2,3,4};;int[] nums2 = {0,1,2,3,4,5};;int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};

  • 第2题:

    【多选题】下列数组初始化语句哪些是正确的?(2 分)

    A.int[] nums = new int[]{0,1,2,3,4};

    B.int[] nums2 = {0,1,2,3,4,5};

    C.int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}};

    D.int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};


    int[] nums = new int[]{0,1,2,3,4};;int[] nums2 = {0,1,2,3,4,5};;int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};

  • 第3题:

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

    A.int num[0..2008];

    B.int num[];

    C.int N=2008; int num[N];

    D.#define N 2008 int num[N];


    #define N 2008 int num[N];

  • 第4题:

    下列数组初始化语句哪些是正确的

    A.int[] nums = new int[]{0,1,2,3,4};

    B.int[] nums2 = {0,1,2,3,4,5};

    C.int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}};

    D.int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};


    int[] nums = new int[]{0,1,2,3,4};;int[] nums2 = {0,1,2,3,4,5};;int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};

  • 第5题:

    【单选题】下列关于数组的定义形式,正确的是

    A.int[ ][ ]num=new int[ ][3];

    B.int[ ][ ]num=new int[3][ ];

    C.int[ 3] num;

    D.int[3][ ]num;


    char b[]; b = new char[80];