更多“下面哪条语句定义了5个元素的数组()A、int []a={22,23,24,25,12};B、int a[]=new int(5);C、int ”相关问题
  • 第1题:

    申请一个具有n个int型元素的一维动态数组,可以使用下面的哪条语句?

    A.p = (int *) malloc(n * sizeof(int));

    B.p = (int *)calloc(n, sizeof(int));

    C.p = (int *) malloc(n, sizeof(int));

    D.p = (int *)calloc(n * sizeof(int));

    E.int p[n];

    F.p = (int *) realloc(n * sizeof(int));


    p = (int *) malloc(n * sizeof(int));

  • 第2题:

    12、申请一个m行n列的整型的二维动态数组,可以使用下面的哪条语句?

    A.申请一个m行n列的整型的二维动态数组,可以使用下面的哪条语句?

    B.p = (int *)calloc(m*n, sizeof(int));

    C.p = (int *) malloc(m*n, sizeof(int));

    D.p = (int *) malloc(m*n, sizeof(int));

    E.p = (int *) malloc(m*n, sizeof(int));

    F.p = (int *) realloc(m * n * sizeof(int));


    p = (int *) malloc(m*n*sizeof(int));

  • 第3题:

    下面哪条语句定义了5个元素的数组()

    A.int [] a={22,23,24,25,12};  

    B.int a []=new int(5); 

    C.int [5] array;  

    D.int [] arr;


    int[] a={22,2,3,4,5};

  • 第4题:

    9、申请一个具有n个int型元素的一维动态数组,可以使用下面的哪条语句?

    A.p = (int *) malloc(n * sizeof(int));

    B.p = (int *)calloc(n, sizeof(int));

    C.p = (int *) malloc(n, sizeof(int));

    D.p = (int *)calloc(n * sizeof(int));

    E.int p[n];

    F.p = (int *) realloc(n * sizeof(int));


    p = (int *) malloc(n * sizeof(int));;p = (int *)calloc(n, sizeof(int));

  • 第5题:

    下面哪条语句定义了5个元素的数组

    A.int [] a={22,23,24,25,12};

    B.int a []=new int(5);

    C.int [5] array;

    D.int [] arr;


    int[] a={22,2,3,4,5};