diff --git a/C++2.cpp b/C++2.cpp new file mode 100644 index 0000000..6ab981a --- /dev/null +++ b/C++2.cpp @@ -0,0 +1,25 @@ +// CPP program to demonstrate working of +// reinterpret_cast +#include + +using namespace std; + + +int main() +{ + + int* p = new int(65); + + char* ch = reinterpret_cast(p); + + cout << *p << endl; + + cout << *ch << endl; + + cout << p << endl; + + cout << ch << endl; + + return 0; +} +Output