wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz 1 Stack [Pre-Test]

Total questions: 15

Worksheet time: 9mins

Name
Class
Date
1.

The process of inserting an element in stack is called?

a)

Create

b)

Push

c)

Evaluation

d)

Pop

2.

The process of removing an element from stack is called?

a)

Create

b)

Push

c)

Evaluation

d)

Pop

3.

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

a)

Underflow

b)

Empty Collection

c)

Overflow

d)

Garbage Collection

4.

When pushing an element into the stack that is already having five elements and stack size of 5, then stack becomes?

a)

Overflow

b)

Crash

c)

Underflow

d)

Full

5.

A stack is a data structure in which elements?

a)

Can be added to any position and removed only from the top

b)

Can be only added to the top and removed from any position

c)

Can be added and removed from the top only

d)

Can be added and removed from any position

6.

Only top element can be accessed in stack?

a)

TRUE

b)

FALSE

c)

MAYBE

d)

SOMETIMES

7.

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 is?

a)

1

b)

2

c)

3

d)

5

8.

It is used to specify the form of an object and it combines data representation and methods for manipulating that data into one neat package.

a)

Class

b)

Struct

c)

Node

d)

Encapsulation

9.

(a)   data and functions are accessible inside that class only.

10.

(a)   data and functions are accessible both inside and outside the class.

11.

To look at elements in the top of the stack without removing them.

(a)  

12.

In order to keep track of current topmost element of the stack we need to maintain one variable.

a)

YES

b)

NO

c)

Both YES and NO

d)

None of the Choices

13.

Select a real life situation implementing stack data structure.

a)

The cars garage the first car in will be the last car out of the garage

b)

The batteries in a flashlight

c)

The person wear bangles

d)

All of the Choices

14.

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

a)

ABCD

b)

DCBA

c)

DCAB

d)

ABDC

15.

The elements are remove from the stack in ________ order.

a)

Reverse

b)

Hierarchical

c)

Alternative

d)

Sequential