{}
run-icon
main.cpp
#include <iostream> using namespace std; int main() { int x = 20; int* ptr = &x; cout << "value of x: " << x << endl; cout << "address of x : " << &x << endl; cout << "value stored in ptr: " << ptr << endl; return 0; }
Output