Program for Other Pointer types


    #include <iostream.h>
    #include <conio.h>
    void main ( )
    {
        char *a, b ;
        float *c, d ;
        double *e, f ;
               clrscr ( ) ;

        b = 'x' ;
        d = 1.2 ;
        f = 100.009 ;

        cout<< "\nValue of b : "<< b ;
        a = &b ;
        cout<< "\nValue of location pointed by a  :  "<< *a ;

        cout<<"\nValue of d  : "<< d ;
        c = &d ;
        cout<<"\nValue of location pointed by c  : "<< *c ;

        cout<<"\nValue of f v : "<< f ;
        e = &f ;
        cout<<"\nValue of location pointed by  :  "<< *e ;
    }

0 comments:

Post a Comment

 
 
 
 


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