
Stack

Quiz
•
Computers
•
University
•
Hard
Kokila Kokila
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Process of inserting an element in stack is called ____________
Create
Push
Evaluation
Pop
Answer explanation
Push operation allows users to insert elements in the stack.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Process of removing an element from stack is called __________
Create
Push
Evaluation
Pop
Answer explanation
Elements in the stack are removed using pop operation. Pop operation removes the top most element in the stack i.e. last entered element.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a stack, if a user tries to remove an element from an empty stack it is called _________
Underflow
Empty collection
Overflow
Garbage Collection
Answer explanation
Underflow occurs when the user performs a pop operation on an empty stack. Overflow occurs when the stack is full and the user performs a push operation. Garbage Collection is used to recover the memory occupied by objects that are no longer used.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Pushing an element into stack already having five elements and stack size of 5, then stack becomes ___________________
Overflow
Crash
Underflow
User flow
Answer explanation
The stack is filled with 5 elements and pushing one more element causes a stack overflow. This results in overwriting memory, code and loss of unsaved work on the computer.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not the application of stack?
A parentheses balancing program
Tracking of local variables at run time
Compiler Syntax Analyzer
Data Transfer between two asynchronous process
Answer explanation
Data transfer between the two asynchronous process uses the queue data structure for synchronisation. The rest are all stack applications.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the usual algorithm for determining whether a sequence of parentheses is balanced. The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(())) ?
1
2
3
4 or more
Answer explanation
In the entire parenthesis balancing method when the incoming token is a left parenthesis it is pushed into stack. A right parenthesis makes pop operation to delete the elements in stack till we get left parenthesis as top most element. 2 left parenthesis are pushed whereas one right parenthesis removes one of left parenthesis. 2 elements are there before right parenthesis which is the maximum number of elements in stack at run time.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of the postfix expression 6 3 2 4 + – *?
1
40
74
-18
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
DS MODULE 3 LINKED LIST

Quiz
•
University
15 questions
NSCC-CODE TO COIN

Quiz
•
University
10 questions
Information Security Uk11

Quiz
•
University
10 questions
Quiz - CSE

Quiz
•
University
15 questions
Data Structures Minor-1

Quiz
•
University
15 questions
Data Structure

Quiz
•
University
10 questions
Stack & Queue

Quiz
•
University
10 questions
DMA and Stacks

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University