Hi Jmannu
I guess you misunderstood Marlene's post.
here the assignment happens first and c gets value 10. But due to side effect c's value also get incremented at the end of the entire expression and gets stored in c in the same was as c++.
2. Evaluate the right operand.
Perform the postfix operator ++. Add 1 to the value of c and store it in c. Now c holds the value 11.
This means that you need to evaluate c++. So now c is 11.
The result of the postfix expression is value of the variable before the new value was stored. The result of the expression c++ is 10.
This means that when you do c++ on c which intially contains 10 then c would be incremented but the value returned by c++ will be the intial value of c. Example System.out.println(c++ + c++ + c++) the result would be (10 + 11 + 12) because the intial c++ causes c to become 11 and returns 10 so the equation's result is 33.
3. Perform the assignment operation =.
Store the result of the postfix expression in c. Store 10 in c.
The = operator has the last precedence. So the assignment of the value 10 will happen at the end when c has been incremented.