Q. What is the output of the following code?

Code:
int x = 10;
System.out.println(x++);
  • (A) 10
  • (B) 11
  • (C) Compiler error
  • (D) Undefined
πŸ’¬ Discuss
βœ… Correct Answer: (A) 10
Explanation: The value of x is printed before it is incremented.
Explanation by: Deepak Sahoo
The value of x is printed before it is incremented.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
320
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Deepak Sahoo
Publisher
πŸ“ˆ
92%
Success Rate