Increment decrement | Sololearn: Learn to code for FREE!

+1

Increment decrement

a=2,b b=a++ + ++a + a++*a+a; cout«a; the answer of this is - 5 how???

10/17/2016 5:16:41 AM

Sakshi bissa

2 Answers

New Answer

+1

Here is a video I made to help. C++ Increment and Decrement Explained Simply in 6 Minutes Order of Coding Operations https://youtu.be/GQQFCFWWnaA

-1

b=2[a+1=3]+[a+1=4]4+(4[a+1=5]*5)+5 b=31 a=5