What will be the output of the C#.NET code snippet given below?

Loading

โœช Choose the correct option.

What will be the output of the C#.NET code snippet given below?

int a = 10, b = 20, c = 30;
int res = a < b ? a < c ? c : a : b;
Console.WriteLine(res);

A. 10
B. 20
C. 30
D. compiler error

Leave a Comment