Examveda

What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 1, j = 2, k = 3;
    do
    {
        Console.WriteLine((Convert.ToBoolean(Convert.ToInt32(i++))) 
        && (Convert.ToBoolean(Convert.ToInt32(++j))));
    }while (i <= 3);
    Console.ReadLine();
}

A. 0 0 0

B. True True True

C. 1 1 1

D. False False False

Answer: Option B


Join The Discussion

Related Questions on Control Flow Statements in C Sharp