Difference between Reference and Pointer in C++
Here you will learn about difference between reference and pointer in C++. Reference: Reference contains address of a variable. It can be called as alternative name of a variable. Example: int i; int &ri = i; Pointer: Pointer also contains address of a variable. Example: int i; int *pi = &i; Both reference and pointer are used to …
