36 .
What Will Be The Output Of The Following Code:
using System;
public class Program
    {
        public static void Main(string[] args)
        {
            String a = "TechBeamers";
            String b = "TECHBEAMERS";
            int c;
            c = a.CompareTo(b);
            Console.WriteLine(c);
        }
     }

A.-1
B. 1
C. 0
D.Error
View AnswerAns: -1
37 .
What Will Be The Output Of The Following Code:
using System;
public class Program
    {
       static void arrayMethod(int[] a)
    {
        int[] b = new int[5];
        a = b;
    }
        public static void Main(string[] args)
        {
            int[] arr = new int[10];
            arrayMethod(arr);
            Console.WriteLine(arr.Length);
        }
    }

A.5
B. 10
C. 15
D.20
View AnswerAns: 10
38 .
What Will Be The Output Of The Following Code:
using System;
public class Program
    {
        public static void Main(string[] args)
        {
            Program p = new Program();
            p.print(2, 3, 8);
            int[] arr = { 2, 11, 15, 20 };
            p.print(arr);
            Console.ReadLine();
        }
        public void print(params int[] b)
        {
            foreach (int i in b)
            {
                Console.WriteLine(i);
            }
        }
    }

A.2 3 8 2 11 15 20
B. 2 3 8 11 15 20
C. 2 11 15 20
D.Error
View AnswerAns: 2 3 8 2 11 15 20
39 .
What Will Be The Output Of The Following Code:
using System;
public class Program
    {      
      public static void Main(string[] args)
        {
          char x = 'A';
           int i = 0;
          Console.WriteLine (true  ? x : 0);
          Console.WriteLine(false ? i : x); 
        }
    }

A.65 65
B. true false
C. 1 0
D.Error
View AnswerAns: 65 65
40 .
What Will Be The Output Of The Following Code:
using System;
public class Program
    {
 
        public static void Main(string[] args)
        {
            int num1 = 20;
            int num2 = 30;
            num1 ^= num2 ^= num1 ^= num2;
            Console.WriteLine(num1 + ","+ num2);
        }
    }

A.0,20
B. 10,30
C. 20,30
D.0,30
View AnswerAns: 0,20