What Will Be The Output Of The Following C Code Snippetp Pre #668

What will be the output of the following C# code snippet?</p> <pre><code class="language-csharp" line="1"> 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(); } </code></pre>

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Delegates, Generics and LINQ - Introduction of Array Class - Quiz No.1.


Similar question(s) are as followings:



Online Quizzes of gs108 CSharp

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background