Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Worksheet: Arrays, Stacks, Infix/Postfix (Grade 13)

Total questions: 60

Worksheet time: 30mins

Name
Class
Date
1.

Array stores elements in

a)

random memory

b)

contiguous memory

c)

linked memory

d)

stack

2.

Index of first element is

a)

0

b)

1

c)

−1

d)

MAX

3.

Insertion shifts elements

a)

left

b)

right

c)

up

d)

none

4.

Deletion shifts elements

a)

left

b)

right

c)

up

d)

none

5.

Array overflow occurs when

a)

n < MAX

b)

n == MAX

c)

n > 0

d)

n = 0

6.

Array underflow occurs when

a)

n = 0

b)

n > 0

c)

n < MAX

d)

n = MAX

7.

Array size is

a)

fixed

b)

dynamic

c)

infinite

d)

flexible

8.

Which operation displays elements?

a)

insert

b)

delete

c)

display

d)

create

9.

Array is a

a)

linear structure

b)

non-linear structure

c)

tree

d)

graph

10.

Maximum size is defined by

a)

n

b)

MAX

c)

size

d)

index

11.

Stack follows

a)

FIFO

b)

LIFO

c)

FILO

d)

none

12.

Stack insertion is called

a)

pop

b)

push

c)

peek

d)

display

13.

Stack deletion is called

a)

pop

b)

push

c)

peek

d)

show

14.

Top initially is

a)

0

b)

1

c)

−1

d)

MAX

15.

Stack overflow when

a)

top = −1

b)

top = MAX−1

c)

top = 0

d)

none

16.

Stack underflow when

a)

top = −1

b)

top = MAX

c)

top = 1

d)

none

17.

Peek shows

a)

first element

b)

last element

c)

top element

d)

middle

18.

Stack is a

a)

linear DS

b)

non-linear DS

c)

tree

d)

graph

19.

Stack uses

a)

queue

b)

array

c)

graph

d)

tree

20.

Stack is used in

a)

recursion

b)

expression evaluation

c)

undo

d)

all

21.

Infix example is

a)

AB+

b)

A+B

c)

+AB

d)

ABC

22.

Postfix example is

a)

AB+

b)

+AB

c)

A+B

d)

*AB

23.

Conversion uses

a)

queue

b)

stack

c)

tree

d)

array

24.

Operator precedence is highest for

a)

+

b)

*

c)

d)

−

25.

Parenthesis has

a)

highest precedence

b)

lowest precedence

c)

no precedence

d)

equal precedence

26.

Operators are stored in

a)

array

b)

stack

c)

tree

d)

list

27.

Operands go to

a)

stack

b)

output

c)

queue

d)

list

28.

Symbol used to mark stack bottom

a)

#

b)

$

c)

@

d)

*

29.

In postfix operators appear

a)

before operands

b)

after operands

c)

between operands

d)

none

30.

Infix-to-postfix avoids

a)

parentheses

b)

operators

c)

operands

d)

stack

31.

Postfix evaluation uses

a)

queue

b)

stack

c)

array

d)

tree

32.

Operands are

a)

pushed

b)

popped

c)

ignored

33.

Operator causes

a)

one pop

b)

two pops

c)

no pop

d)

push

34.

Result is pushed back into

a)

array

b)

queue

c)

stack

d)

tree

35.

Expression evaluated is

a)

infix

b)

prefix

c)

postfix

d)

none

36.

' ' represents

a)

power

b)

multiply

c)

divide

d)

add

37.

Final result is on

a)

top

b)

bottom

c)

middle

d)

none

38.

Stack stores

a)

characters

b)

integers

c)

floats

d)

all

39.

Evaluation follows

a)

precedence

b)

LIFO

c)

FIFO

d)

none

40.

Postfix avoids

a)

brackets

b)

operands

c)

operators

d)

stack

41.

Recursion means

a)

loop

b)

function calling itself

c)

memory

d)

stack

42.

Fibonacci uses

a)

array

b)

recursion

c)

stack

d)

tree

43.

Tower of Hanoi has

a)

2 rods

b)

3 rods

c)

4 rods

d)

5 rods

44.

Number of moves =

a)

n2n^2

b)

2n2^n

c)

2n−12^n - 1

d)

nn

45.

Only one disk can be moved at a time

a)

True

b)

False

46.

Base case stops

a)

recursion

b)

program

c)

output

d)

stack

47.

Fibonacci starts with

a)

0, 1

b)

1, 2

c)

2, 3

d)

3, 5

48.

Hanoi is a

a)

sorting

b)

searching

c)

recursive problem

d)

graph

49.

Auxiliary peg is

a)

helper

b)

source

c)

destination

d)

root

50.

Recursion uses

a)

stack

b)

array

c)

graph

d)

queue

51.

Queue follows

a)

FIFO

b)

LIFO

c)

FILO

d)

none

52.

Insertion happens at

a)

front

b)

rear

c)

middle

d)

none

53.

Deletion happens at

a)

front

b)

rear

c)

middle

d)

none

54.

Queue overflow when

a)

rear=MAX−1rear = MAX - 1

b)

front=−1front = -1

c)

both

d)

none

55.

Queue underflow when

a)

front>rearfront > rear

b)

rear>frontrear > front

c)

both

d)

none

56.

Peek returns

a)

front element

b)

rear element

c)

middle

d)

none

57.

Queue is

a)

linear DS

b)

non-linear DS

c)

tree

d)

graph

58.

Queue stores elements in

a)

stack

b)

array

c)

tree

d)

graph

59.

Rear is used for

a)

deletion

b)

insertion

c)

display

d)

none

60.

Queue is used in

a)

scheduling

b)

printers

c)

BFS

d)

all