Friday, 3 January 2014

SIMPLE OUTPUT PROGRAM (To get the concept about working of a pointer)

#include<stdio.h>
int main ()
{
int x,y,*z;
x=5;
y=10;
z=&x;
printf("Value of x is :%d\n",x);
printf("Address  of x is:%d\n",&x);
printf("Value of y is:%d\n",y);
printf("Address  of y is:%d\n",&y);
printf("Value of *z is:%d\n",*z);
printf("Address  of x is:%d\n",z);
getch();
return 0;
}

No comments:

Post a Comment