The address of a reference is the address of the referent. Remember that the reference is the referent. Anything done to the reference including taking its address is actually done to the referent. For example, the following code will print yes since &i will be equal to &j. #include <iostream> using namespace std; void sample(int* p, int* q) { if (p == q) cout << "yes\n"; else cout << "no\n"; } int main() { int i = 5; int& j = i; sample(&i, &j); } |