wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Arrays

Total questions: 37

Worksheet time: 17mins

Name
Class
Date
1.

Array is a finite, ordered set of _______________elements.

a)

Heterogeneous

b)

Homogeneous

c)

None of the above

2.

In array we access the value of element using index.

a)

True

b)

False

3.

Largest value of the index is called _________________

a)

Lower bound

b)

Upper bound

c)

Index set

d)

value set

4.

In array we access each element exactly once is called_________

a)

Insertion

b)

Deletion

c)

Traversing

d)

None of the above

5.

formula for calculate the Length and the size or range of the array

a)

LB+UB

b)

UB-LB+!

c)

LB-UB+1

d)

None of the above

6.

The set of values of all array elements called_____________

a)

Index set

b)

Value set

c)

None of the above

7.

In array Index set is denoted by____

a)

T

b)

LB

c)

UB

d)

i

8.

An array where elements are referenced by two subscript called

a)

1-Dimensional array

b)

Two-Dimensional array

c)

none of the above

9.

How many possible ways to store 2-D array in computer memory?

a)

4

b)

3

c)

1

d)

2

10.

An array is called sparse array if it has a number of_________ elements.

a)

0

b)

1

c)

2

d)

3

11.

Using ____________ operation we can add the element at the end of the array.

a)

Deletion

b)

Traversing

c)

Insertion

d)

None of the above

12.

Address calculation of elements of 1-D array using

a)

BASE+(K-LB)*W

b)

BASE-(K-LB)*W

c)

BASE-(K+LB)*W

d)

BASE+(K+LB)*W

13.

Each element in an array can be accessed via its___________

a)

LB

b)

UB

c)

Index

d)

Value

14.

Array length is 10 which means it can store ________ elements.

a)

12

b)

10

c)

11

d)

9

15.

In which elements can be referenced by one subscript or index is called________________

a)

Linear array

b)

One dimensional array

c)

Both of the above

16.

Array is a collection of finite elements. Here Finite means

a)

not countable

b)

countable

17.

In array each element of the set has a unique position.

a)

True

b)

False

18.

In 2- d array a[4][3], Here 4 represents the number of _________?

a)

Columns

b)

Rows

c)

Index

d)

Value

19.

How many possible ways to stored 2-D array in computer memory?

a)

3

b)

1

c)

2

d)

4

20.

Address of the first element of the array is known as the ____________

a)

Base address

b)

Lower bound

c)

Upper bound

d)

none of the above.

21.

The process of removing an element from an array is called_________

a)

None of the above

b)

Deletion

c)

Traversal

d)

Insertion

22.

In a 2-D array, the total number of elements is calculated by multiplying the number of ________ and ________.

a)

Indexes, Values

b)

Rows, Values

c)

Columns, Indexes

d)

Rows, Columns

23.

Which of the following is true about a multi-dimensional array?

a)

It can only be 2-D

b)

It is always sparse

c)

It can have more than two dimensions

d)

None of the above

24.

What is the time complexity of accessing an element in an array?

a)

O(n^2)

b)

O(1)

c)

O(n)

d)

O(log n)

25.

Which of the following operations is not typically performed on an array?

a)

Insertion

b)

Deletion

c)

Sorting

d)

Compiling

26.

In a 1-D array, the total number of elements is determined by the __________.

a)

Size of the array

b)

None of the above

c)

Index range

d)

Data type

27.

What is the primary purpose of an array in programming?

a)

To create user interfaces

b)

To perform mathematical operations

c)

To store multiple values in a single variable

d)

To manage memory allocation

28.

Which of the following statements is true regarding the size of an array?

a)

It can be changed dynamically

b)

It is fixed at the time of declaration

c)

It can only store integers

d)

It can only store strings

29.

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?

a)

24

b)

12

c)

8

d)

6

30.

Which of the following is a valid operation on an array?

a)

Searching

b)

Compiling

c)

None of the above

d)

Both A and B

31.

In a multi-dimensional array, the number of dimensions is determined by the number of __________.

a)

All of the above

b)

Columns

c)

Rows

d)

Indexes

32.

What is the primary purpose of an array in programming?

a)

To manage memory allocation

b)

To create user interfaces

c)

To perform mathematical operations

d)

To store multiple values in a single variable

33.

Which of the following is a characteristic of a one-dimensional array?

a)

It can store elements in multiple rows and columns

b)

It can only store integer values

c)

It requires more memory than a two-dimensional array

d)

It is a linear data structure

34.

In a two-dimensional array, how do you access the element located at the first row and second column?

a)

a[1][1]

b)

a[2][1]

c)

a[0][1]

d)

a[1][2]

35.

In a two-dimensional array, the first index represents the __________.

a)

Column

b)

Value

c)

Size

d)

Row

36.

What is the primary characteristic of a sparse array?

a)

It contains mostly non-zero elements

b)

It is a one-dimensional array

c)

It can only store integers

d)

It contains mostly zero elements

37.

Which of the following is a valid way to declare a two-dimensional array in most programming languages?

a)

int array(5,5);

b)

int array[5][5];

c)

array int[5][5];

d)

array[5,5] int;