/*PROGRAM TO PASS A WHOLE 2-D ARRAY TO A FUNCTION*/

 

 

#include<stdio.h>

#include<conio.h>

 

void fun(int[][],int,int);

void main()

{

int a[][2]={{1,2},{3,4}};

clrscr();

fun(a,2,2);

getch();

}

 

void fun(int x[][2],int m,int n)

{

int i,j;

for(i=0;i<m;i++)

{

for(j=0;j<n;j++)

{

printf(“\ta%d%d=%d”,i,j,x[i][j]);

}

}

}

173 total views, 2 views today

Get Free Email Updates..!
Join us for FREE to get instant email updates..! GobsInfo- Everything Unlimited
We hate spam. Your email address will not be sold or shared with anyone else.