Reference variable

Explain the meaning of reference variable?

E

Expert

Verified

A reference variable provides an alias (alternative name) for previously defined variable. For example, Sum total, if form the variable a reference to variable, then sum and total may be used inter-changeably for representing that particular variable.

Syntax:

Data-type &reference-name = variable-name

For eg:

Float total = 100;
Float sum = total;

   Related Questions in C/C++ Programming

©TutorsGlobe All rights reserved 2022-2023.