Input
Output
#include <iostream> using namespace std; int main() { int a=10; int *p; p=&a; /* store address of a variable in pointer variable*/ cout << "Address of a variable is " << &a << endl; cout << "Address of p variable is " << p << endl; /* access the value using the pointer */ cout << "Value of *p variable is " << *p << endl; return 0; }