adplus-dvertising
frame-decoration

Question

Correct output for the following set of code is :
public static void Main(string[] args)
  {
      int i = 546;
      object o = i;
      int n =(int) o;
      o = 70;
      System. Console. WriteLine("The value-type value = {0}", n);
      System. Console. WriteLine("The object-type value = {0}", o);
      Console. ReadLine();
  }

a.

546, 0

b.

546, 546

c.

546, 70

d.

70, 546

Posted under C# programming

Answer: (c).546, 70

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 :