adplus-dvertising
frame-decoration

Question

Correct output for the following set of code is :
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

Posted under C# programming

Answer: (b).456, 123

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Correct output for the following set of code is :