Programming Languages C# Objective
Mar 06, 2013

What will be the output of the following code? 

    int x = 1; 

    float y = 1.1f;

    short z = 1;

    Console.WriteLine((float) x + y * z - (x += (short) y));

Choose the correct answer:
A) 0.1
B) 1.0
C) 1.1
D) 11
Detailed Explanation

Option A is the right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback