@Priya:

Lvalue is not a contant value. It can be modifiable or unmodifiable. Lvalue
stands for location value that means that we can store some value here in
this location and rvalue stands for read value that means that it can be
stored at some location that is in memory having lvalue.

Here in case of array a[]. a is unmodifiable Lvalue(Location). That means it
can be used in left hand side of assignment operator because its memory
location.

i.e a[1]=5;
it is a location of array having index 1 contaioning value as 5.

Here 5 was a RValue(Read Value) because it can be assigned to the LValue
Variable.

According to you it is a RValue(Read Value).If it is so then this program
should work

a[]={1,2,3};
b[];
b=a;

But it does not . Because a is not a value that can be read .It was a memory
location.So we cannot assign array a to array b. For this we have to use

memset(b,a,sizeof(b))





On Sat, Sep 3, 2011 at 11:10 PM, priya ramesh <
love.for.programm...@gmail.com> wrote:

> if it is an l value, the compiler should say
> "cannot modify const value"
> instead it says
> "l value required"
> This statement proves that a is an r value in main. right??
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to