wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

A7 - STACK

Total questions: 27

Worksheet time: 14mins

Name
Class
Date
1.

A (a)   is an Abstract Data Type (ADT), commonly used in most programming languages. It is named stack as it behaves like a real-world stack, for example – a deck of cards or a pile of plates, etc.

2.

A (a)   allows operations at one end only. For example, we can place or remove a card or plate from the top of the stack only. Likewise, Stack ADT allows all data operations at one end only. At any given time, we can only access the top element of a stack.

3.

This feature makes it ____ data structure. ____ stands for Last-In-First-Out. Here, the element which is placed (inserted or added) last, is accessed first. In stack terminology, insertion operation is called PUSH operation and removal operation is called POP operation.

(a)  

4.

LIFO stands for (a)   .

5.

A stack can be implemented by means of _____, _____, _____, and _______.

(a)  

6.

Stack can either be a fixed size one or it may have a sense of (a)   .

7.

Here, we are going to implement stack using (a)   , which makes it a fixed size stack implementation.

8.

Stack operations may involve ______ the stack, ________ it, and __________ it. 

(a)  

9.

Pushing (storing) an element on the stack.

(a)  

10.

Removing (accessing) an element from the stack.

(a)  

11.

When data is (a)   ed onto stack.

To use a stack efficiently, we need to check the status of stack as well.

12.

get the top data element of the stack, without removing it.

(a)  

13.

check if stack is full.

(a)  

14.

check if stack is empty.

(a)  

15.

At all times, we maintain a pointer to the last PUSHed data on the stack. As this pointer always represents the ___ of the stack, hence named ___. The ___ pointer :provides ___ value of the stack without actually removing it.

(a)  

16.

The process of putting a new data element onto stack is known as a ____ ______. 

(a)  

17.

In the push operation. This step checks if the stack is full.

(a)  

18.

In the push operation. This steps seeks if the stack is full, produces an error and exit.

(a)  

19.

In the push operation. This step seeks if the stack is not full, increments top to point next empty space.

(a)  

20.

In the push operation. This step adds data element to the stack location, where top is pointing.

(a)  

21.

In the push operation. This step shows a returns success.

(a)  

22.

Accessing the content while removing it from the stack, is known as a _______ . In an array implementation of _______, the data element is not actually removed, instead top is decremented to a lower position in the stack to point to the next value. But in linked-list implementation, pop() actually removes data element and deallocates memory space.

(a)  

23.

In the pop operation. This step checks if the stack is empty.



(a)  

24.

In the pop operation. This step seeks if the stack is empty, produces an error and exit.

(a)  

25.

In the pop operation. This step seeks if the stack is not empty, accesses the data element at which top is pointing.

(a)  

26.

In the pop operation. This step decreases the value of top by 1.

(a)  

27.

In the pop operation. This step shows a returns success.

(a)