wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DSA-Stack

Total questions: 14

Worksheet time: 9mins

Name
Class
Date
1.

What is the use of push operation in stack?

a)

Insertion

b)

Deletion

c)

Display

d)

Print the topmost element

2.

What is the use of pop operation in a stack?

a)

Insertion

b)

Deletion

c)

Display

d)

Prints the topmost element in a stack

3.
Are stacks FIFO or FILO?
a)
FILO
b)
FIFO
c)
LIFO
d)
LILO
4.

Only top element can be accessed in stack

a)

TRUE

b)

FALSE

5.

Stacks have LIFO ordering

a)

TRUE

b)

FALSE

6.

Which of them is an abstract data structure (ADT)?

a)

A) Stacks

b)

B) Queues

c)

Both A and C

d)

C) Functions

7.

LIFO stands for

a)

Last in First Out

b)

First in Last Out

c)

List of Outputs

d)

None of them

8.

Act of adding values into a stack is called

a)

Popping

b)

Pushing

c)

Polling

d)

None

9.

Which of the following statement(s) about stack data structure is/are NOT correct?

a)

Stack data structure can be implemented using linked list

b)

New node can only be added at the top of the stack

c)

The last node at the bottom of the stack has a NULL link

HIDE ANSWER

d)

Stack is the FIFO data structure

10.

If the elements “A”, “B”, “D” and “C” are placed in a stack and are deleted one at a time, in what order will they be removed?

a)

ABCD

b)

ABDC

c)

CDBA

d)

DCAB

11.

Consider the following operation performed on a stack of size 5.


Push(1);

Pop();

Push(2);

Push(3);

Pop();

Push(4);

Pop();

Pop();

Push(5);


After the completion of all operation, the no of element present on stack are

a)

1

b)

3

c)

2

d)

4

12.

In a stack, if a user tries to remove an element from empty stack it is called _________

a)

Underflow

b)

Empty collection

c)

Overflow

d)

Garbage Collection

13.

Which one of the following is an application of Stack Data Structure?

a)

Managing function calls

b)

The stock span problem

c)

Arithmetic expression evaluation

d)

All of the above

14.

List of data in which element can be inserted and removed at the same end is called as __________.

a)

array

b)

stack

c)

linked list

d)

queue