Question
What is the output of this program?class increment {public static void main(String args[]) { int g = 3;System.out.print(++g * 8);} }
Answer: Option C
Was this answer helpful ?
Operator ++ has more preference than *, thus g becomes 4 and when multiplied by 8 gives 32.
Was this answer helpful ?
More Questions on This Topic :
Question 1. Which of these is not a bitwise operator? ....
Question 3. Which of these is returned by greater than, ....
Question 5. Which of these statement is correct? ....
Question 7. Which of these have highest precedence? ....
Submit Solution