11.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int [] a = {1, 2, 3, 4, 5};
    fun(a);
    Console.ReadLine();
}
static void fun(params int[] b )
{
    int[] k = { 3, 4, 7, 8,'\0' };
    for (int i = 0; i < b.Length; i++)
    {
        b[i] = b[i] + k[i] ;
        Console.WriteLine( b[i] + " ");
    }
}

13.
Which statement is correct about following c#.NET code?
int[] a= {11, 3, 5, 9, 6};

14.
What will be the output of the following C# code?
 static void Main(string[] args)
 {
     int[] a = { 2, 21, 34, 46, 85, 88, 90};
     fun(a);
     Console.WriteLine(a + " ");
     Console.ReadLine();
 }
 static void fun(params int [] b )
 {
     int [] c = { 1, 2, 3, 4, 5, 6, 7};
     int i ;
     for (i = 0 ;i < b.Length ;i++)
     if (b[i] % 2 == 0)
     {
         c[i] = b[i];
     }
     Console.WriteLine("even numbers are:");
     for (i = 0 ;i <= b.Length ;i++)
     {
         Console.WriteLine(c[i]);
     }
 }

16.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int a = 5;
    int b = 0, c = 0;
    method (a,  ref b, ref c);
    Console.WriteLine(b + "  " + c);
    Console.ReadLine();
}
static int method(int x, int p, ref int k)
{
    p = x + x * x;
    k = x * x + p;
    return 0;
}

17.
Which statement is/are correct?

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.