- #1
ladesidude
- 4
- 0
Code:
int* a1 = malloc(4 * sizeof(int));
int* a2 = malloc(3 * sizeof(int));
int* a3 = malloc(5 * sizeof(int));
a1[0] = 1; a1[1] = 2; a1[2] = 3; a1[3] = 4;
a2[0] = 9; a2[1] = 8; a2[3] = 7;
a3[0] = -1; a3[1] = -2; a3[2] = -3; a3[3] = -4; a3[4] = -5;
My question:
Are a1, a2 and a3 arrays? I think they are pointers that point to an array right?
Secondly, If a1, a2, and a3 are considered to be arrays, are they of the same size?