A

Admin • 828.03K Points
Coach

Q. What will be the output of the following code?

Code:
int x = 10;
Console.WriteLine(++x);
  • (A) 10
  • (B) 11
  • (C) 12
  • (D) Runtime error

Explanation by: Admin
Pre-increment increments the value first and then prints it.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.