Originally posted by Muhammad Shahzad:
But this is not evaluated as according to precedence or I have got the wrong understanding.
Thanks in advance.
Shahzad
Are you expecting 11?
Two things to remember:
1. Postfix Increment/Decrement - return the orignal value in the expression
then increment/decrement the variable.
2. Prefix Increment/Decrement - increment/decrement the variable
then return the result in the expression.
float c = a++ / --b;
float c =
10 / 1;
float c = 10.0
If you print
a after that expression you will get 11;