Re: Passing a 2d array to a function in C
#include
#include
#include
// Ref : http://www.eskimo.com/~scs/cclass/int/sx9b.html
void printArray(int **array, int m, int n)
{
for(int i=0;i
int main()
{
int i,j,k=0, m=5, n=20;
int **a=(int **)malloc(m*sizeof(int *));
for(i=0;i
system("PAUSE");
return 0;
}
No comments:
Post a Comment