Home / Programming MCQs / C# MCQs / Question

B

Babita • 7.55K Points
Tutor III

Q. What will be the output of the following C# code?

Code:
public static void Main(string[] args)
    {
        int i = 123;
        object o = i;
        i = 456;
        System. Console. WriteLine("The value-type value = {0}", i);
        System. Console. WriteLine("The object-type value = {0}", o);
        Console. ReadLine();
    }
(A) 123, 123
(B) 456, 123
(C) 456, 456
(D) 123, 456

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.