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

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

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

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

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

C、int [5] array;

D、int [] arr;


参考答案

更多 “ 下面哪条语句定义了5个元素的数组()A、int []a={22,23,24,25,12};B、int a[]=new int(5);C、int [5] array;D、int [] arr; ” 相关考题
考题 定义p并使p指向动态空间中的包含30个整数的数组所使用的定义语句为()。 A、int*p=newint[30]B、int*p=newint(30)C、int*p=new[30]int*p=new[30]D、*p=newint[30]

考题 下面哪条语句定义了5个元素的数组_________。 A.int[]a={22,23,24,25,12};B.inta[]=newint(5);C.int[]arr;D.int[5]array;

考题 3、申请一个具有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));

考题 5、动态分配包含20个元素的int型数组,下列语句中正确的是()。A.int *p = new int[20];B.int *p = new int(20);C.int *p = new [20];D.int p = new int[20];

考题 申请一个具有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));

考题 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));

考题 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));

考题 下面哪条语句定义了5个元素的数组A.int [] a={22,23,24,25,12};B.int a []=new int(5);C.int [5] array;D.int [] arr;

考题 下面哪条语句定义了5个元素的数组()A.int [] a={22,23,24,25,12};  B.int a []=new int(5); C.int [5] array;  D.int [] arr;