A

Admin • 828.03K Points
Coach

Q. What will be the output?

Code:
string s = null;
Console.WriteLine(s ?? "Default");
  • (A) null
  • (B) Default
  • (C) Empty string
  • (D) Runtime error

Explanation by: Admin
Null-coalescing operator returns right operand if left is null.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.