πŸ“Š JAVA
Q. What will be the output?
Code:
int x = 5;
System.out.println(x++ + ++x);
  • (A) 11
  • (B) 12
  • (C) 13
  • (D) 10
πŸ’¬ Discuss
βœ… Correct Answer: (B) 12

Explanation: x++ gives 5 then x becomes 6, ++x makes it 7, so 5 + 7 = 12.

Explanation by: Roshan
x++ gives 5 then x becomes 6, ++x makes it 7, so 5 + 7 = 12.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
1
Total Visits
πŸ“½οΈ
6 d ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
91%
Success Rate