Examveda

What will be the output of the following C# 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

Answer: Option C


Join The Discussion

Related Questions on Basic Syntax and Data Types in C Sharp