Q34. What is a variable? In C++, two values are associated with a symbolic variable. What are these?
Ans. A variable is a named storage location whose value can be manipulated during program run.
There are two values associated with a symbolic variable:
- Its data value, stored at some location in memory. This is sometimes referred to as a variable’s rvalue (pronounced “are-value”).
- Its location value; that is, the address in memory at which its data value is stored. This is sometimes referred to as a variable’s lvalue (pronounced “el-value’”).