NEW
Font size
WorksheetsArrays
Total questions: 37
Worksheet time: 17mins
Array is a finite, ordered set of _______________elements.
Heterogeneous
Homogeneous
None of the above
In array we access the value of element using index.
True
False
Largest value of the index is called _________________
Lower bound
Upper bound
Index set
value set
In array we access each element exactly once is called_________
Insertion
Deletion
Traversing
None of the above
formula for calculate the Length and the size or range of the array
LB+UB
UB-LB+!
LB-UB+1
None of the above
The set of values of all array elements called_____________
Index set
Value set
None of the above
In array Index set is denoted by____
T
LB
UB
i
An array where elements are referenced by two subscript called
1-Dimensional array
Two-Dimensional array
none of the above
How many possible ways to store 2-D array in computer memory?
4
3
1
2
An array is called sparse array if it has a number of_________ elements.
0
1
2
3
Using ____________ operation we can add the element at the end of the array.
Deletion
Traversing
Insertion
None of the above
Address calculation of elements of 1-D array using
BASE+(K-LB)*W
BASE-(K-LB)*W
BASE-(K+LB)*W
BASE+(K+LB)*W
Each element in an array can be accessed via its___________
LB
UB
Index
Value
Array length is 10 which means it can store ________ elements.
12
10
11
9
In which elements can be referenced by one subscript or index is called________________
Linear array
One dimensional array
Both of the above
Array is a collection of finite elements. Here Finite means
not countable
countable
In array each element of the set has a unique position.
True
False
In 2- d array a[4][3], Here 4 represents the number of _________?
Columns
Rows
Index
Value
How many possible ways to stored 2-D array in computer memory?
3
1
2
4
Address of the first element of the array is known as the ____________
Base address
Lower bound
Upper bound
none of the above.
The process of removing an element from an array is called_________
None of the above
Deletion
Traversal
Insertion
In a 2-D array, the total number of elements is calculated by multiplying the number of ________ and ________.
Indexes, Values
Rows, Values
Columns, Indexes
Rows, Columns
Which of the following is true about a multi-dimensional array?
It can only be 2-D
It is always sparse
It can have more than two dimensions
None of the above
What is the time complexity of accessing an element in an array?
O(n^2)
O(1)
O(n)
O(log n)
Which of the following operations is not typically performed on an array?
Insertion
Deletion
Sorting
Compiling
In a 1-D array, the total number of elements is determined by the __________.
Size of the array
None of the above
Index range
Data type
What is the primary purpose of an array in programming?
To create user interfaces
To perform mathematical operations
To store multiple values in a single variable
To manage memory allocation
Which of the following statements is true regarding the size of an array?
It can be changed dynamically
It is fixed at the time of declaration
It can only store integers
It can only store strings
In a multi-dimensional array, the total number of elements is calculated by multiplying the size of each dimension. For a 3-D array with dimensions 2, 3, and 4, what is the total number of elements?
24
12
8
6
Which of the following is a valid operation on an array?
Searching
Compiling
None of the above
Both A and B
In a multi-dimensional array, the number of dimensions is determined by the number of __________.
All of the above
Columns
Rows
Indexes
What is the primary purpose of an array in programming?
To manage memory allocation
To create user interfaces
To perform mathematical operations
To store multiple values in a single variable
Which of the following is a characteristic of a one-dimensional array?
It can store elements in multiple rows and columns
It can only store integer values
It requires more memory than a two-dimensional array
It is a linear data structure
In a two-dimensional array, how do you access the element located at the first row and second column?
a[1][1]
a[2][1]
a[0][1]
a[1][2]
In a two-dimensional array, the first index represents the __________.
Column
Value
Size
Row
What is the primary characteristic of a sparse array?
It contains mostly non-zero elements
It is a one-dimensional array
It can only store integers
It contains mostly zero elements
Which of the following is a valid way to declare a two-dimensional array in most programming languages?
int array(5,5);
int array[5][5];
array int[5][5];
array[5,5] int;
