The red circle question only. 22. When applied to an array al ] of integers, the
ID: 3727045 • Letter: T
Question
The red circle question only. 22. When applied to an array al ] of integers, the pseudo code boolean sort true int k = 0 while sorttrue and k alk+1] Then sort false k k+1 A) will sort the array al in ascending (nondecreasing) order will sort the array a[] in descending (nonincreasing) order C) will determine if the array is arranged in ascending order will determine if the array is arranged in descending order 23.when you create an instance of a generic class, what types c an you pass as arguments for the class - pe parameters? A) primitive types only ject references only C) interface types only primitive, reference, and interface types 24. In a binary search, A) it is assumed that all of the elements are integers. B) it is assumed that all of the elements are Strings C) it is assumed that the search pool is small. D) it is assumed that the search pool is ordered. E) it is assumed that the search pool is large. 25.lf al ] is an array of integers, the pseudo code int m 1 While mExplanation / Answer
22) It will determine if the elements are in ascending order or not
Reason
If at any point the element at index 0 is greater than element at index 1 it means that the element is not in increasing order and hence the loop will be skipped.
Hence it will be break. And the loop will be terminated.
Hence it will be very helpful in such cases.
23) We can pass all the three.
Hence option 3
They are mainly used to pass primitive types or values used in a program and then objects and finally we can even pass interfaces as well
25) It will display the smallest element location in the array.
reason is we are starting with the initial assumption that the first element is the minimum element.
later at any point if we get a value less then it then we are taking that smallest element position.
This will continue like this until we are left the smallest index
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.