What is mean by a reference variable in C++?

please give me a defination of reference variable.

1 Like

C++ references allow you to create a second name for the a variable that you can use to read or modify the original data stored in that variable.

int val;
int& refVal= val;

// refVal is now a reference to val ; now val will be 20
refVal = 20;
std::cout << val <