Practice question
3 marksHow many elements are there in a two-dimensional array declared as int a[5][4], and how much memory does it occupy if an int takes 4 bytes?
ArraysMediumNumerical
Computer Science · Class 12 · ISC
Single- and double-dimensional arrays, searching, sorting, and array-based problems.
6questions
Syllabus mapping: ISC syllabus (CISCE) (opens CISCE's website in a new tab)
6 questions
Practice question
3 marksHow many elements are there in a two-dimensional array declared as int a[5][4], and how much memory does it occupy if an int takes 4 bytes?
ArraysMediumNumerical
Practice question
3 marksState the worst-case number of comparisons made by bubble sort on an array of n elements.
ArraysMediumNumerical
Practice question
3 marksWrite a Java program segment to search for a value v in a sorted array a of size n using binary search.
ArraysMediumApplication based
Practice question
3 marksWrite a Java program segment to print the transpose of a square matrix a of size n.
ArraysMediumApplication based
Practice question
3 marksWrite a Java program segment to sort a one-dimensional integer array in ascending order using selection sort.
ArraysMediumApplication based
Practice question
3 marksWrite a Java program segment to find the sum of the elements of the left diagonal of a square matrix a of size n.
ArraysMediumApplication based