Yes ,with a little modification that the term rvalue does not exist in
C-standard .
It is either an lvalue or not an lvalue in C.
In C++ ,it does.

On Jun 20, 4:37 pm, himanshu kansal <himanshukansal...@gmail.com>
wrote:
> @ritesh.....so cn i say dt post increment produce rvalue in c and c++
> both....
> bt preincrement produces rvalue in c nd lvalue in c++.....
>
> On Mon, Jun 20, 2011 at 5:03 PM, RITESH SRIVASTAV
> <riteshkumar...@gmail.com>wrote:
>
>
>
> > It relates to the concept of lvalue and rvalue.
> > In C++, pre-increment produces lvalue which can be modified . ( but
> > because of absence of sequence point in the twice modification of
> > variable val, the result is undefined.)
> > In C , pre-increment does not produce lvalue so it can't be
> > modified ,hence the error.
>
> > On Jun 20, 4:06 pm, Shachindra A C <sachindr...@gmail.com> wrote:
> > > As far as I understand, this has got nothing to do with references and
> > pls
> > > ignore my earlier post.
>
> > > On Mon, Jun 20, 2011 at 4:31 PM, Shachindra A C <sachindr...@gmail.com
> > >wrote:
>
> > > > I didnt execute your code...but i think having a look at the assembly
> > code
> > > > produced could give a good insight into the actual working.
>
> > > > On Mon, Jun 20, 2011 at 4:26 PM, himanshu kansal <
> > > > himanshukansal...@gmail.com> wrote:
>
> > > >> int val;
> > > >> int *p=&val;
>
> > > >> why does (++val)++ gives err in c bt nt in c++.....
> > > >> i knw dt abv expression wd produce undefined results bt i just want to
> > > >> knw why its nt giving the err in c++....
>
> > > >> 2nd ques is whn ++val++ is invalid thn why ++*p++ is valid....
>
> > > >> does it hv something to do wd references....??
>
> > > >> --
> > > >> 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.
>
> > > > --
> > > > Regards,
> > > > Shachindra A C
>
> > > --
> > > Regards,
> > > Shachindra A C
>
> > --
> > 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.
>
> --
>
>       Regards
> Himanshu Kansal
>   Msc Comp. sc.
> (University of Delhi)

-- 
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