Search

Sponsored Links

Meta

Categories

Archives

Recent Posts

RSS Feeds

04
Nov

Increment(++) and decrement(–) operations

Related Blog Items

In c : post and pre ++/– gives rvalue as result and takes an lvalue

So, x++++ gives error, next x++ evaluates to rvalue but next ++ operation requires lvalue

In c++ :

Post ++/– gives a rvalue as result

Pre –/++ gives a lvalue as result

So —-x works fine, x++++ doesnt work

X[i]=i++ works ?

Works but behaviour undefined coz we dont know leftside i will evaluated first or right side i evaluated

[tags] increment operation, decrement operation[/tags]

Popularity: 8%

You need to log on to convert this article into PDF


Related Blog Items

1 Comment

Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image