Създаване на масив от масиви или 2D-масив динамично
Примерен код
0
0
създаване на масив от масиви или 2D-масив динамично
int ** arr = malloc(N*sizeof(int *));
for(i=0; i< N; i++) arr[i] = malloc(M*sizeof(int));
/* or you can use this simpler version*/
int (*arr)[M] = malloc(sizeof(int[N][M]));
/* arr is pointer to int[M]
use like arr[0][M-1];
and free(arr);
*/