+ 4
Dynamic 2D array
Can anyone please explain to me how can I allocate, deallocate and reallocate 2D array in C briefly. And assigning values to array. I'm well aware of dynamic memory allocation but want help to understand dynamic memory for 2D array. I guess it's done something like that. char * arr = malloc(rows * column * sizeof(char));
2 Answers