How References Work?
A reference works as a pointer. A reference is declared as an alias of a variable. It stores the address of the variable, as illustrated:
and so a reference variable will has memory, just like pointer and maybe it is a const pointer, the value of the pointer varialbe can not be modified.
more detail, refer https://www3.ntu.edu.sg/home/ehchua/programming/cpp/cp4_PointerReference.html