
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
12 questions
Quiz 2 - Stack

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

Quiz
•
University
9 questions
Stacks/Queues

Quiz
•
University
15 questions
Stack - Data Structures

Quiz
•
University
15 questions
ROTC Make-up Quiz

Quiz
•
University
12 questions
Data Structures

Quiz
•
University
15 questions
Stack

Quiz
•
University
14 questions
A-Level Computer Science Data Structures Quiz

Quiz
•
12th Grade - University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University