A

Admin • 802.91K Points
Coach

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

Code:
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
  • Correct Answer - Option(C)
  • Views: 3
  • Filed under category C# (C Sharp)
  • Hashtags:

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.

Be the first to start discuss.