InterviewSolution
Saved Bookmarks
| 1. |
Write A Program That Will Convert An Integer Pointer To An Integer And Vice-versa. |
|
Answer» The following program demonstrates this. #include<stdio.h> #include<iosream> #include<conio.h> 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 ; }The following program demonstrates this. |
|