// Program to illustrate reinterpret_cast operator
#include<iostream.h>
void main()
{
     unsigned a=34;
     unsigned *uptr;
     void *vptr=&a;
     char *cptr="Welcome";
     uptr=reinterpret_cast <unsigned *> (vptr);
     cout<<"\n Value of unsigned pointer is :"<<*uptr;
     cout<<"\n Value of char pointer is :"<<*cptr;
     a=reinterpret_cast <unsigned> (cptr);
     cout<<"\n char * to unsigned is :"<<a;
     cptr=reinterpret_cast <char *> (a);
     cout<<"\n unsigned to char * is :"<<cptr;
     cout<<endl;
}
Test data
Output
Value of unsigned pointer is : 34
Value of char pointer is : W
char * to unsigned is : 4350116
unsigned to char * is : Welcome