Answer Posted / vadivel t
Simple definitions:
Lvalue - is value which can be modified(it cannot be a
constant). And it can act as Rvalue too.
Rvalue - is value which can be able to fetch from the
memory, propably a constant. It can also act as Lvalue(if
it is not a constant).
Dont be confused... Lets hav example.
Example:
int a = 0, b = 10;
1.Rvalue
if(a)
{
...
...
...
}
here a is RValue(cos, as per definition, the value is able
to fetch from the memory)
2.One variable acting as L and R value
a = a + b;
here a + b; evaluated fist.. lets analise...
First a and b has to be fetched from the memory, by this
time, both will act as a Rvalue(as per definition)....
then a + b result shall be assigned to 'a'. Now 'a' will be
acting as a Lvalue. Cos u able to modify it...
So here 'a' can act as L as well as R value depends on the
situation.
3.a = 10;
Here 10 is Rvalue and 'a' ll act as Lvalue.
Hope u understand clearly.
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What does emoji p mean?
Explain what is the general form of a c program?
What is the use of typedef in structure in c?
How to compare array with pointer in c?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
What is static and volatile in c?
Is exit(status) truly equivalent to returning the same status from main?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
Explain void pointer?
What is I ++ in c programming?
What is stack in c?
What is the difference between #include
Where are some collections of useful code fragments and examples?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
What are the different types of errors?