The following method should search a value in an array and return Boolean result to the method call The following method
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
The following method should search a value in an array and return Boolean result to the method call The following method
statement. There are THREE (3) errors in the code below. Analyze the code and identify the errors. ( for eg :- Line 16: IbIDisplay.Text = "Thank you";) \begin{tabular}{|c|c|} \hline & private bool search(int[] sArray, int value) \\ 2 & bool found = false; \\ 4 & int index =0; \\ 5 & while (? found AND index < sArray.Length) \\ 6 & i \\ 7 & if (sArray [0]=m value) \\ 9 & i found = true; \\ 10 & indext+; \\ 12 & return index; \end{tabular} 10
The following method should search a value in an array and return Boolean result to the method call The following method should search a value in an array and