Examveda

What will be the output of the following C# code?
static void Main(string[] args)
{
    int a = 4, b = 5, c = 7, u = 9;
    int h;
    h = (Convert.ToInt32(u < b)) + (a + b--) + 2;
    Console.WriteLine(h);
    Console.WriteLine(b);
    Console.WriteLine(u < b);
}

A. 12, 5, 0

B. 11, 4, False

C. 11, 5, 0

D. 12, 4, False

Answer: Option B


Join The Discussion

Related Questions on Operators and Expressions in C Sharp