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); } }
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); } }
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); } } }
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); } }
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); } }