<<123>>
6.

Select the correct statement about the C#.NET code given below?

class Trial
{
int i;
float d;
}


struct Sample
{
private int a;
private Single b;
private Trial t;
}


Sample s = new Sample();


A) trial object referred by t is created on the stack

B) t is created on the heap

C) Both s and t will be created on the heap

D) s will be created on the stack



7.

Select the correct statement about the C#.NET code given below?

struct Person
{
private String name;
private int age;
private string pin_code;
}
Person p = new Person();


A) New structure can be inherited from struct book

B) When the program terminates, variable p will get garbage collected

C) The variable ā€˜pā€™ will be created on the stack

D) The variable ā€˜pā€™ will be created on the heap



8.

Which of the conversions are valid for the given set of code?

static void Main(string[] args)
{
int a = 20;
long b = 40;
double c = 1.789;
b = a;
c = a;
a = b;
b = c;
}


A) c = a, b = c

B) a = c, b = a

C) b = a, c = a

D) All of the mentioned



9.

Which implicit datatype conversion is not possible by the compiler?


A) ushort to long

B) int to uint

C) ushort to long

D) byte to decimal



<<123>>