
Stack
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Kokila Kokila
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - University
15 questions
Graphs
Quiz
•
University
12 questions
Spreadsheet Starter
Quiz
•
7th Grade - University
14 questions
ISDATut3
Quiz
•
University
15 questions
Brewing JavaFX Quiz
Quiz
•
University
10 questions
Adobe Photoshop
Quiz
•
University
10 questions
Choose the level of Bloom’s Taxonomy
Quiz
•
University
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
