A

Admin • 828.03K Points
Coach

Q. What will be printed?

Code:
int x = 1;
if(x == 1)
Console.WriteLine("A");
Console.WriteLine("B");
  • (A) A
  • (B) B
  • (C) A B
  • (D) Nothing

Explanation by: Admin
Both statements execute because only first line is under if.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.