Saved Bookmarks
| 1. |
What will be the value of y if x=5 y= ++x + --x + ++x |
|
Answer» ong>Answer: c++ or g++ compiler. It will give OUTPUT as y=12. Expression include PRE and POST increment operator. x++ will be 5 (if value of x is 5) only as it prints or holds the value first than increment the value later. It is a case of pre-increment operator ++x will be 6 (if value of x is 5) as it INCREMENTS the value first than prints or holds the value later. It is a case of post-increment operator |
|