Program to illustrate Pointer


    #include <iostream.h>
    #include<conio.h>
    void main( )
    {
        int i = 5 ;
        cout <<" \n Address of i =  " << &i ;
        cout <<" \n Value of i =  " << i ;
        cout <<" \n Value of i =  " << *(&i) ;
        getch();
    }   

---------------------------------------------------


    /* Program to illustrate Pointer */
          #include <iostream.h>
           void main( )
          {
               int i = 5 ;
               cout <<" \n Address of i =  "<< &i ;
               cout <<" \n Value of i =  "<< i ;
           }   

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|