/* PROGRAM TO PASS A WHOLE ARRAY A TO A FUNCTION*/

 

 

#include<stdio.h>

#include<conio.h>

 

void fun(int[],int);

void main()

{

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

clrscr();

 

fun(a,5);

getch();

}

 

void fun(int x[],int n)

{

int j;

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

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

}

172 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.