
Queue Operations Quiz
Quiz
•
Computers
•
9th Grade
•
Hard
Donna Callender
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a dequeue operation?
Removes and returns the element from the front of the queue
Removes and returns the element from the rear of the queue.
Removes the element from the front of the queue.
Returns the element from the rear of the queue.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A queue is implemented in Python using the built-in list data structure. What Python method is used to implement enqueue() function?
insert()
append()
add()
delete()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If maxsize is equal to size of the array used in a circular queue (q), complete the pseudocode given for enqueue operation. function enQueue(element){ if q.isFull() print(‘Queue is full’) else rear=...................... q[rear]=newElement}
rear+1
(rear+1) MOD maxsize
(rear-1) MOD maxsize
(front-1) MOD maxsize
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What element does the rear pointer point to?
‘a’
‘b’
‘c’
‘d’
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of q? (Based on the following operations performed on a circular queue implemented using an array: q=Queue(4), q.enQueue(10), q.enQueue(20), q.enQueue(30), q.enQueue(40), q.deQueue(), q.enQueue(50))
[10, 20, 30, 40]
[10, 20, 30, 50]
[50, 10, 20, 30]
[50, 20, 30, 40]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is q.rear? (Based on the following operations performed on a circular queue implemented using an array: q=Queue(4), q.enQueue(10), q.enQueue(20), q.enQueue(30), q.enQueue(40), q.deQueue(), q.enQueue(50))
0
1
2
3
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If max size is equal to size of the array used in a circular queue (q), complete the pseudocode given for dequeue operation. function deQueue(){ if q.isEmpty(){ print(‘Queue is empty’) element=null} else{ .................................. .................................. } return element }
element=q[front] front=(front+1) MOD maxsize
element=q[rear] rear=(rear-1) MOD maxsize
element=q[front] front=(front-1) MOD maxsize
element=q[front+1] front=(front+1) MOD maxsize
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
9-Sinf III chorak CHSB
Quiz
•
9th Grade
12 questions
Pengenalan Google Classroom
Quiz
•
5th Grade - Professio...
10 questions
HTML introduction
Quiz
•
8th - 9th Grade
15 questions
Image Representation
Quiz
•
7th - 10th Grade
10 questions
Intro to Python
Quiz
•
KG - University
13 questions
JavaScript Variables
Quiz
•
3rd Grade - University
10 questions
T3_PC6.1 & PC6.2
Quiz
•
9th Grade
10 questions
Pseudocode - Arrays
Quiz
•
8th - 11th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
