Declaring pointer:
int a; int *x=&a;
x occupies 8 bytes of memory
Likewise if we declare a reference to a variable:
int a; int &x =a;
How much memory does the the reference to a occupy?
Declaring pointer:
int a; int *x=&a;
x occupies 8 bytes of memory
Likewise if we declare a reference to a variable:
int a; int &x =a;
How much memory does the the reference to a occupy?
That's undefined. Not as in Undefined Behavior, but the question simply doesn't have an answer.