Hello here is a short program to Pass pointer to array as an argument to a function and print the content of the function.
Thats all!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include<stdio.h>
void display (int *a)
{
int i;
for(i=0;i<10;i++)
{
printf("%d\n",*(a+i));
}
}
void main()
{
int data[10]={1,3,5,7,9,2,4,6,8,0};
display(data);
}
|
Thats all!