C++ Programmer Question:

Explain me what is meant by reference variable in C++?

Tweet Share WhatsApp

Answer:

In C++, reference variable allows you create an alias (second name) for an already existing variable. A reference variable can be used to access (read/write) the original data. That means, both the variable and reference variable are attached to same memory location. In effect, if you change the value of a variable using reference variable, both will get changed (because both are attached to same memory location).

Download C++ Programmer PDF Read All 59 C++ Programmer Questions
Previous QuestionNext Question
Tell us in how many ways we can initialize an int variable in C++?Tell me what is abstraction?