32. Give an output for following code:
int x = 5, y = 7, B;
B = x + + + x ++- - -y;
System.out.println("B =" + B );
Answers
Answered by
3
Answer:
B=5
Explanation:
x++ would be 6 which would be stored in the memory
the next x++ will take the memory value of x, i.e 6
because the operator here is post increment.
Then y value will be 6 since there us a pre increment operator used here...
Hence B=5.
Similar questions