Q54
What will be the output of the following C# code snippet? static void Main(string[] args) int[] nums = 5, 4, 6, 3, 14, 9, 8, 17, 1, 24, -1, 0 ; Array.Sort(nums); int idx = Array.BinarySearch(nums, 14); if (idx == 9) Console.WriteLine(Convert.ToBoolean(1)); else Console.WriteLine(Convert.ToBoolean(0)); Console.WriteLine("Index of 14 is " + idx); Console.ReadLine();
A.
TRUE
0
0
B.
Run time error
C.
TRUE
9
Answer9
D.
None of the mentioned
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board