0 votes
in C Plus Plus by

What is a Reference Variable in C++?

1 Answer

0 votes
by
A reference variable is an alias name for the existing variable. This means that both the variable name and the reference variable point to the same memory location. Hence, whenever the variable is updated, the reference is updated too.

Example:

int a=10;

 int& b = a;

Here, b is the reference of a.

Storage Classes

Related questions

+2 votes
asked Jun 19, 2019 in C Plus Plus by anonymous
0 votes
asked Mar 10, 2020 in C Plus Plus by rahuljain1
0 votes
asked Jan 9 in Selenium by sharadyadav1986
...