Reference variable

Write a program to demonstrate the use of the reference variable.

#include<iostream>
using namespace std;
int main()
{
	int a = 87;
	int &p = a;
	cout << "a = " << a << " p = " << p << endl;
	cout << "&a = " << &a << " &p = " << &p << endl;
	return 0;
}

Output

a = 87 p = 87
&a = 0x28fef8 &p = 0x28fef8