A

Admin • 828.03K Points
Coach

Q. What will be the output?

Code:
int? x = null;
Console.WriteLine(x ?? 100);
  • (A) null
  • (B) 0
  • (C) 100
  • (D) Runtime error

Explanation by: Admin
The null-coalescing operator returns the right value if left is null.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.