51.
What will be the output of the following C# code?
static void Main(string[] args)
{
    String a = "Ilove";
    String b = "CSHARP";
    b = string.Concat(a, '  ', b);
    Console.WriteLine(b);
    Console.ReadLine();
}

52.
What will be the output of the following C# code?
static void Main(string[] args)
{
    String obj = "hello";
    String obj1 = "world";   
    String obj2 = obj;
    string s = obj+" "+obj1;
    Console.WriteLine(s.IndexOf('r'));
    Console.ReadLine();
}

53.
What does the term 'immutable' means in term of string objects?

54.
Accessibility modifier defined in a class are?

56.
What will be the output of the following C# code?
static void main(string[] args)
{
    int i;
    int res = fun (out i);
    console.writeline(res);
    console.readline();
}
static int fun(out int i)
{
    int s = 1;
    i = 7;
    for (int j = 1; j <= i; j++ )
    s = s * j;
    return s;
}

57.
What will be the output of the following C# code?
static void Main(string[] args)
{
    String obj = "hello";
    String obj1 = "world";   
    String obj2 = obj;
    string s = obj + "  " + obj1;
    Console.WriteLine(s.Substring(6 ,5));
    Console.ReadLine();
}

58.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i, j;
    int[, ] arr = new int[ 3, 3];
    for (i = 0; i < 3; ++i)
    {
        for (j = 0; j < 3; ++j)
        {
            arr[i, j] = i * 2 + i * 2;
            Console.WriteLine(arr[i, j]);
        }
        Console.ReadLine();
    }
}

60.
What will be the output of the following C# code?
static void Main(string[] args)
{
    object[] a = {" 1 ", 4.0f, " harsh "};
    fun(a);
    Console.ReadLine();
}
static void fun(params object[] b)
{
    for (int i = 0; i < b.Length - 1; i++)
        Console.WriteLine(b[i] + " ");
}

Read More Section(Arrays and Strings in C Sharp)

Each Section contains maximum 100 MCQs question on Arrays and Strings in C Sharp. To get more questions visit other sections.