<<12
6.

Correct output for the following set of code is :

class Program
{
public static void Main(string[] args)
{
int i, j;
i = (j = 10) + 20;
Console. WriteLine(i);
Console. WriteLine(j);
Console. ReadLine();
}
}


A) 20, 20

B) 30, 20

C) 30, 10

D) 10, 30



7.

Select the output for the following set of code:

public static void Main(string[] args)
{
int i = 200;
object o = i;
int n =(int) o;
o = 100;
System. Console. WriteLine("The value-type value = {0}", n);
System. Console. WriteLine("The object-type value = {0}", o);
Console. ReadLine();
}


A) 100, 200

B) 200, 100

C) 100, 100

D) 200, 200



8.

Select the output for the following set of code:

public static void Main(string[] args)
{
int i = 256;
object o = i;
i = 500;
System. Console. WriteLine("The value-type value = {0}", i);
System. Console. WriteLine("The object-type value = {0}", o);
Console. ReadLine();
}


A) 500, 256

B) 256, 500

C) 256, 256

D) 500, 500



<<12