This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET
int z,x=5,y=-10,a=4,b=2; z=x++ - --y* b/a;
What will be the final value of z?
Answer & ExplanationOption: [C]
The post increment operator is associated with the variable x. So the current variable is considered i.e. x=5.
The pre increment operator is associated with the variable y. So the value of y decreses by 1. That is y=-11.
Multiplication operator and division operator has the same precedence. So the first one is executed first.
So the expression is: