+ 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));

28th May 2021, 7:09 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
2 Respuestas