Array and Pointer and Function

Thursday, 8 September 2011

#include<stdio.h>
#include<conio.h>
void main()
{
int a[]={1,2,3,4,5};
void show(int **,int);
int *p=a;
clrscr();
show(&p,5);
getch();
}


void show(int **pp,int s)
{
   int i;
   printf("Array elements are\n");
   for(i=0;i<s;i++)
   printf("%d\n",*(*pp+i));
}


OUTPUT:


Array elements are
1
2
3
4
5











No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading