Examveda

What will be the output of the following C# code?
static void Main(string[] args)
{
    float i = 1.0f, j = 0.05f;
    do
    {
        Console.WriteLine(i++ - ++j);
    }while (i < 2.0f && j <= 2.0f);
    Console.ReadLine();
}

A. 0.05

B. -0.05

C. 0.95

D. -0.04999995

Answer: Option D


Join The Discussion

Related Questions on Control Flow Statements in C Sharp