Examveda

What will be the output of the following C# code?
static void Main(string[] args)
{
    int x = 1;
    float y = 2. 4f;
    short z = 1;
    Console. WriteLine((float) x + y * z - (x + = (short) y) );
    Console. ReadLine();
}

A. 0.4000004

B. 0.4000023

C. 0.0400021

D. 0.4000001

Answer: Option D


Join The Discussion

Related Questions on Basic Syntax and Data Types in C Sharp