Program to declare array of pointer and address the element to other array.

void main()
{
int a[10],b[10],c[10],d[10],e[10];
int *p[5];
int i;
clrscr();
p[0]=a;
p[1]=b;
p[2]=c;
p[3]=d;
p[4]=e;
printf("\nThe address of 5 array are\n");
for(i=0;i<5;i++)
{
printf("The address of array %d is %u\n",i+1,p[i]);
}
getch();
}

No comments:

Post a Comment