Variable and two values associated with a symbolic variable.

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:

  1. Its data value, stored at some location in memory. This is sometimes referred to as a variable’s rvalue (pronounced “are-value”).
  2.   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’”).

Leave a Reply

Your email address will not be published. Required fields are marked *

290 Views
%d bloggers like this: