SyntaxFix
Write A Post
Hire A Developer
Questions
int rows, columns; /* initialize rows and columns to the desired value */ arr = (int**)malloc(rows*sizeof(int*)); for(i=0;i<rows;i++) { arr[i] = (int*)malloc(cols*sizeof(int)); }