204.
What is output from the following code snippet?
try
{
int a = 10;
int? b = null;
int c = 20;
Console.Write(a + (b ?? c));
}
catch(Exception)
{
Console.Write("Error");
}
View Description
The ?? is a null coalescing operator, if b is null then use c else use b, so for the snippet in the code the sum carried out is actually a + c as b is set to null, if b had a int value then the sum would have been a + b.