1
1.

What is the difference between keywords 'var' and 'dynamic'?


A) ‘var’ is introduced in C# (3.0) and ‘dynamic’ is introduced in C# (4.0)

B) ‘var’ variable declaration is done at compile time while ‘dynamic’ declaration is achieved at runtime by compiler

C) For ‘var’ Error is caught at compile time and for ‘dynamic’ Error is caught at runtime

D) All of the mentioned



2.

What is the output of following set of code ?

int x,y;
x = (y = 10) + 5;


A) y = 10, x = 5

B) y = 15, x = 5

C) x = 15, y = 10

D) x = 10, y = 10



3.

What will be the output for the following set of code?

static void Main(string[] args)
{
const int x = 10;
const int y = 20;
for (int i = 1; i <= 5; i++)
{
x = x * i;
y = y * i;
}
Console.WriteLine(x);
Console.WriteLine(y);
Console.ReadLine();
}


A) 1200, 2400

B) Compile time error

C) 2400, 1200

D) 12, 24



4.

What will the output of the given set of Code?

static void Main(string[] args)
{
String name = "Dr.Saju";
Console.WriteLine("Good Morning" + name);
}


A) Dr.Saju

B) Good Morning

C) Good MorningDr.Saju

D) Good Morning Dr.Saju



5.

What will be output of the following conversion ?

static void Main(string[] args)
{
char x = 'X';
string y = "x";
Console.WriteLine(Convert.ToInt32(x));
Console.WriteLine(Convert.ToInt32(Convert.ToChar(y)));
Console.ReadLine();
}


A) 88, 120

B) 120, 88

C) 88, 121

D) 121, 80



1