
Quiz on Queue Concepts 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
Which of the following correctly describes the operation of a queue?
Last-In-First-Out (LIFO)
First-In-First-Out (FIFO)
Last-In-Last-Out (LILO)
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What condition indicates a queue is empty in an array implementation?
rear == capacity - 1
front == rear
front == -1 && rear == -1
front > rear
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the initialization of a queue, what are the initial values of front and rear?
0, 0
-1, -1
0, -1
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is an overflow condition determined in a circular queue?
rear == front
(front == rear + 1) || (front == 0 && rear == maxSize - 1)
front == -1
rear == maxSize
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
During the enqueue operation of a simple array-based queue, what happens when the queue is full?
The rear pointer is reset to -1.
Elements are shifted left.
The enqueue operation is blocked.
The rear pointer cycles to 0.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed by this code after enqueue operations? enqueue(queue, 5); enqueue(queue, 10); printf("Front: %d", queue->array[queue->front]);
Front: 5
Front: 10
Undefined behavior
No output (program crashes).
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What condition should replace ___ in the following dequeue function? int dequeue(struct Queue* queue) { if (___) { printf("Queue is empty\n"); return -1; } int item = queue->array[queue->front]; if (queue->front == queue->rear) { queue->front = queue->rear = -1; } else { queue->front = (queue->front + 1) % queue->capacity; } return item; }
queue->rear == queue->capacity
queue->front == queue->rear
queue->front == -1 && queue->rear == -1
queue->front == -1
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
A level Computer Science In-fix post-fix Reverse polish
Quiz
•
10th Grade - University
10 questions
T02: Python - The Basics
Quiz
•
University
15 questions
LATIHAN SOAL PEMROGRAMAN
Quiz
•
9th Grade - University
10 questions
Hyrje në SO
Quiz
•
University
10 questions
6 - Изменение размеров и формы объектов
Quiz
•
University
10 questions
Machine Learning (Introduction)
Quiz
•
University
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
14 questions
LA5.C5: Branching and Subroutines
Quiz
•
9th Grade - University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University