CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Null-Coalescing and Its Assignment

C# code walkthrough · Question 49
mediumNull Handling

Code

Read carefully. What does this print?
1int? a = null;
2int b = a ?? 10;
3a ??= 20;
4Console.WriteLine($"{b} {a}");

Your answer