
Stack Operations Quiz 1
Authored by HASAN YIGIT
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the peek() operation do in a stack?
Returns the top element without removing it.
Removes the top element.
Adds an element to the stack.
Clears the stack.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the stack operations: Push(3), Push(5), Pop(), Push(7), Push(9), what is the stack content (top to bottom)?
7, 9
9, 7, 3
3, 9, 7
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure can evaluate postfix expressions?
Queue
Stack
Binary Tree
Linked List
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does the following code accomplish? if (stack->top capacity / 4) { resizeStack(stack, stack->capacity / 2); }
Increases the stack size.
Decreases the stack size.
Checks if the stack is empty.
Duplicates the stack.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following sequence? push(5); push(10); pop(); push(20); pop(); peek();
5
10
20
None of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the condition to increase the stack size dynamically in an array implementation?
top == capacity - 1
top == 0
capacity > top
stack isEmpty()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the order of operations in infix notation?
Operators are between operands
Operators come before operands
Operators come after operands
None of the above
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
10 questions
Microcontroller
Quiz
•
11th Grade - University
14 questions
Input, output and storage de
Quiz
•
8th Grade - Professio...
15 questions
IT 209
Quiz
•
University
10 questions
Living in the IT Era
Quiz
•
University
15 questions
Assessment 08
Quiz
•
University
12 questions
ICT450-TOPIC 1
Quiz
•
University
11 questions
Video Watermaking
Quiz
•
University
10 questions
JSPS Competition Hackathon - Scratch Language - Grade 1
Quiz
•
2nd 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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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