MyComputerWorld
Labels
C PROGRAMS (Arrays Pointers and Structures)
(32)
Computer Tips and Tricks
(26)
Did You Know?
(18)
Downloads
(4)
Various Programs in C
(18)
Tuesday, 5 March 2013
Array of Pointers
#include<stdio.h>
#include<conio.h>
main( )
{
int *pa[3];
int i, a=5, b=10, c=15;
pa[0] = &a;
pa[1] = &b;
pa[2] = &c;
for(i=0; i<3; i++)
{
printf("pa[%d] = %p\t",i,pa[i]);
printf("*pa[%d] = %d\n",i,*pa[i]);
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment