C++ Reference variable


In this topic, you will learn about, C++ Reference variable.

C++ supports one more type of variable called reference variable, in addition to the value variable and pointer variable C. Value variables are used to hold some numerical values; pointer variables are used to hold the address of (pointer to) some other value variable. The reference variable behaves similarly to both, a value variable and a pointer variable. In a program code, it is used similar to that of a value variable but has an action of a pointer variable.

Syntax:- Datatype & ReferenceVariable = ValueVariable;


Program to show the use of reference variable

C++ Reference variableComment below if you have queries related to the above topic,  C++ Reference variable.


Please enter your comment!
Please enter your name here