int* temp = (*myArray);
, , .
de-reference myArray temp, int *, myArray is int **, - int *. , , , myArray , NULL, (* myArray), , myArray ( myArray NULL), , 0x00000000, NULL.
, , .
myArray ======> NULL
int* temp = (*myArray);
myArray - NULL temp points no, , ,
myArray =======> NULL
temp =======> NULL
line 2 temp = (int *) malloc (sizeof (int) * 2);
Allocating the memory of two integers and indicating the tempo of the newly allocated memory so that the image becomes
myArray =======> NULL
temp =======> [ ] [ ]
the next two-line storage 1 and 2 in the 1st and 2nd memory cells, pointed to by temp
temp[0] = 1;
temp[1] = 2;
so now the image
myArray =======> NULL
temp =======> [1] [2]
Abid source
share