πŸ“Š JAVA
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: (B) 11

Explanation: The value of x is incremented before it is printed.

Explanation by: Deepak Sahoo
The value of x is incremented before it is printed.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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