//Program illustrates the working of reinterpret_cast keyword in C++
#include<iostream>
#include<typeinfo>
using namespace std;
int main()
{
char *s="Hello Friends";
int i;
i=reinterpret_cast<int>(s);
cout<<"\ni is: "<<i;
cout<<"\ns is: "<<s;
return 0;
}
#include<iostream>
#include<typeinfo>
using namespace std;
int main()
{
char *s="Hello Friends";
int i;
i=reinterpret_cast<int>(s);
cout<<"\ni is: "<<i;
cout<<"\ns is: "<<s;
return 0;
}
Click here to download the C++ Program.
No comments:
Post a Comment