SyntaxFix
Write A Post
Hire A Developer
Questions
2-D Array Dynamic Memory Allocation
int **a,i; // for any number of rows & columns this will work a = (int **)malloc(rows*sizeof(int *)); for(i=0;i<rows;i++) *(a+i) = (int *)malloc(cols*sizeof(int));