Pointer in C Program

  1. #include<stdio.h>  
  2. #include<conio.h>  
  3. main()  
  4. {  
  5.     int *x,y=30;   
  6.     x=&y; //the contents at x is the value of y  
  7.     printf("The address of y is :\t%d\n",x,y); // address of operator can be applied lvalue  
  8.     printf("The contents of the addrss held in x are:\t%d\n",*x); //*x gives the contents at the address  
  9.     *x=20;  
  10.     printf("The new value of y is:\t%d\n",y);  
  11.       
  12. }