Tuesday, 7 January 2014

PASS ARRAY FROM ONE FUNCTION TO ANOTHER

PASS ARRAY FROM ONE FUNCTION TO ANOTHER

#include<stdio.h>
#include<conio.h>
void pass(int[],int);
void main()
{
int a[]={1,2,3,4,5};
clrscr();
pass(a,5);
getch();
}
void pass(int b[],int n)
{
int i;
for(i=0;i<n;i++)
{
printf(" %d\n",b[i]);
}
}


OUTPUT

PASS ARRAY FROM ONE FUNCTION TO ANOTHER



No comments:

Post a Comment