12>>
1.

Why strings are of reference type in C#.NET ?


A) To create string on stack

B) To reduce size of string

C) To overcome problem of stackoverflow

D) None of the mentioned



2.

From the following statements, what is the correct statement about strings?


A) A string is created on the stack

B) A string is a primitive datatype

C) A string created on heap

D) Creation of string on a stack or on a heap depends on the length of the string



3.

What is the output for the C#.NET code given below?

string s1 = " I AM OK ";
string s2;
s2 = s1.substring (6, 2);
Console.WriteLine (s2);


A) AM OK

B) AM

C) OK

D) I AM O



5.

What is the output for the given C#.NET code?

static void Main(string[] args)
{
string s1 = "Kerala";
string s2;
s2 = s1.Insert (7, "Assam");
Console.WriteLine(s2);
}


A) Kerala Assam

B) KeralaAssam

C) KeralAssam

D) KeraAssam



12>>