
Quiz on Stacks and Data Structures 2

Quiz
•
Computers
•
University
•
Medium
HASAN YIGIT
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the defining principle of a stack?
First-in-first-out (FIFO)
Last-in-first-out (LIFO)
Random order
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens during a pop operation?
The stack is duplicated.
The bottom element is removed.
The top element is removed.
Nothing happens.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure is commonly used to implement a dynamic stack?
Array
Linked List
Queue
Binary Tree
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which application is NOT a real-life use case of stacks?
Undo feature in text editors
Managing memory in recursion
Routing in computer networks
Page-visited history in browsers
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which notation is easier for humans to read but harder for computers to evaluate?
Prefix
Infix
Postfix
Reverse Polish Notation
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does the following code snippet do? void push(struct Stack* stack, int item) { if (isFull(stack)) return; stack->array[++stack->top] = item; }
Removes an item from the stack
Adds an item to the stack
Checks if the stack is full
Initializes the stack
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is a valid check for balanced brackets using a stack? if (stack == NULL) return 0; else if (!isMatchingPair(pop(&stack), exp[i])) return 0;
Checks if the stack is balanced.
Removes unbalanced brackets.
Pushes unmatched brackets onto the stack.
Returns true if brackets are balanced.
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Processing Quiz

Quiz
•
University
12 questions
Analisis Struktur Data

Quiz
•
10th Grade - University
10 questions
Bài test CTDL

Quiz
•
University
10 questions
Queue-lanjutan

Quiz
•
University
10 questions
Flutter Quiz

Quiz
•
University
15 questions
L5 LinkedLists, Vector and Stacks Quiz

Quiz
•
University
6 questions
STACK - Kelompok 3

Quiz
•
University
13 questions
c++ last

Quiz
•
1st Grade - 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