From 808fdf98db0254446727b94c4e3e7384ab1df434 Mon Sep 17 00:00:00 2001 From: sakshi292 <114948270+sakshi292@users.noreply.github.com> Date: Sat, 8 Oct 2022 14:40:43 +0530 Subject: [PATCH] Create C++432cpp --- C++432cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 C++432cpp diff --git a/C++432cpp b/C++432cpp new file mode 100644 index 0000000..6ab981a --- /dev/null +++ b/C++432cpp @@ -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