Interview Questions  

Go Back   Interview Questions > Interview Questions & Answers > Information Technology > Programming Languages > C

C C Interview Questions, Learn by sharing C Interview Questions asked in various companies, Get Career advices, Interview Procedures from C experts, Post asked C Interview Questions and Answers.

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-02-2008, 11:52 AM
Senior Member
 
Join Date: Feb 2008
Posts: 9,095
Default What do "lvalue" and "rvalue" mea

What do "lvalue" and "rvalue" mean?
Reply With Quote
  #2 (permalink)  
Old 04-27-2008, 11:08 AM
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default

"lvalue" is an expression that refers to an
object (which can have (a) value(s) within it), and "rvalue" is an
expression that only has a value (ephemeral value as Chris Torek would
claim) and no association with an object.

As far as their use, an "lvalue" that refers to an object of type T,
can be used anwhere an "rvalue" that that has a type T can be, but not
vice versa. So if one uses an lvalue that refers to an int variable in
an context that requires an int value, then simply the value sitting in
the object is dumped into that context.
Reply With Quote
  #3 (permalink)  
Old 04-29-2008, 05:00 PM
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default

In simple terms:
lvalue means expression that can be used on the left hand side of an assignment.
All lvalues can be used as rvalues. Reverse isn't always true.
Reply With Quote
  #4 (permalink)  
Old 05-29-2008, 08:34 AM
Junior Member
 
Join Date: May 2008
Posts: 2
Default

lvalue means a variable which is used in left hand side of '=' assignment operator...
e.g- x=5....
rvalue will be in right hand side...
Reply With Quote
  #5 (permalink)  
Old 07-07-2008, 05:50 PM
Junior Member
 
Join Date: Jul 2008
Posts: 19
Default

Lvalue(LEFT Value) and RValue(RIGHT Value) are desired through the Assignment Operator(=).
Left Side of the Assienment operator is LValue;It must be one Variable Name.
Right Side of the Assienment operator is RLValue;

Ex:
a = j + 8^90;
a is Lvalue;
j+ 8^90 is RValue;
Reply With Quote
Reply

Tags
c language, interview questions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On