References in C++

Does a reference have a memory location associated with it in C++?
Answer:[1]

No, for ex:

int a;
int &ra = a;
int *pa = &ra;
*pa = 3;


A ref does not have a seperate memory location and for the same reason you cannot declare a
ptr to ref, for ex:
int &* pra; is illegal.

No comments: