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

Join The Discussion