1.

Write a program that will convert an integer pointer to an integer and  vice-versa.

Answer»

The FOLLOWING program demonstrates this.   

#INCLUDE<IOSTREAM&GT;      void main( )      {      INT i = 65000 ;      int *iptr = reinterpret_cast ( i ) ;      cout << endl << iptr ;      iptr++ ;      cout << endl << iptr ;      i = reinterpret_cast ( iptr ) ;      cout << endl << i ;      i++ ;      cout << endl << i ;      }


Discussion

No Comment Found