Practice question
3 marksWrite a Java program segment to find the average of the elements of an integer array a of size n.
ArraysMediumApplication based
Computer Science · Class 11 · ISC
Single- and double-dimensional arrays, traversal, linear and binary search, and selection and bubble sort.
5questions
Syllabus mapping: ISC syllabus (CISCE) (opens CISCE's website in a new tab)
5 questions
Practice question
3 marksWrite a Java program segment to find the average of the elements of an integer array a of size n.
ArraysMediumApplication based
Practice question
3 marksWrite a Java program segment to find the largest element of a one-dimensional integer array a of size n.
ArraysMediumApplication based
Practice question
3 marksWhat happens in Java if a program accesses a[10] in an array declared as int a[] = new int[10]?
ArraysMediumNumerical
Practice question
3 marksState two differences between linear search and binary search.
ArraysMediumShort answer
Practice question
3 marksHow many comparisons does binary search need in the worst case to find an element in a sorted array of 1,024 elements?
ArraysMediumNumerical