{}
run-icon
main.cpp
#include <iostream> using namespace std; int main() { int a = 10; int *p; int b; p = &a; b = *p; cout << "Value of a: " << a << endl; cout << "Address of a: " << &a << endl; cout << "Value stored in pointer p: " << p << endl; cout << "Value copied into b: " << b << endl; return 0; }
Output