Examveda

What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 1;
    while (i <= 1)
    {
        if ('A' < 'a')
        {
            Console.WriteLine("Hello...");
        }
        else
        {
           Console.WriteLine("Hi...");
        }
           i++;
    }
    Console.ReadLine();
}

A. Hi...

B. Hello...

C. Hi... infinite times

D. Hello... infinite times

Answer: Option B


Join The Discussion

Related Questions on Control Flow Statements in C Sharp