
Stack Operations Quiz 1

Quiz
•
Computers
•
University
•
Medium
HASAN YIGIT
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Data Structures

Quiz
•
University
10 questions
Antrean dan Tumpukan (BK) XA

Quiz
•
10th Grade - University
10 questions
PDS - 04225 Intro to Data Structures and Algorithms - Chapter 2

Quiz
•
University
10 questions
data structures

Quiz
•
University
10 questions
PDS - 04225 Lists, Stacks and Queues - Chapter 5

Quiz
•
University
10 questions
STACK - [UJI UAS ALS]

Quiz
•
University
12 questions
Quiz 2 - Stack

Quiz
•
University
9 questions
Stacks/Queues

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

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

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University