/* Program to demonstrate pointer to a
pointer */
#include(stdio.h)
main()
{
int x=2;
int
*y;
int
**z;
y=&x;
z=&y;
printf(“\n Address of x=%u”,&x);
printf(“\n Address of x=%u”,y);
printf(“\n Address of x=%u”,*z);
printf(“\n Address of y=%u”,&y);
printf(“\n Address of y=%u”,z);
printf(“\n value of y=%u”,y);
printf(“\n value of z=%u”,z);
printf(“\n value of x=%d”,x);
printf(“\n value of x=%d”,*(&x));
printf(“\n value of x=%d”,*y);
printf(“\n value of x=%d”,**z);
}
No comments:
Post a Comment