Quiz 2 Practice
Quiz
•
Computers
•
University
•
Practice Problem
•
Easy
Remo Mahmoud
Used 6+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
One advantage of a doubly linked list over a singly linked list is that insertion and deletion is more efficient.
True
False
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A subclass can access the private members of its superclass.
True
False
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A class template cannot have more than one typename.
True
False
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code fragment?
13
7
Infinite loop
17
5.
OPEN ENDED QUESTION
3 mins • 1 pt
Write down the function addFront in class CircleList which takes one argument: An element “e” of type int, passed by reference.
The function creates a new node and puts element “e” in it, and then inserts the newly-created node at the front of the circularly linked list.
Evaluate responses using AI:
OFF
Answer explanation
void CircleList::addFront(int& e) {
CNode* v = new CNode; // create a new node
v−>elem = e;
// handling the special case when the list is empty
if (cursor == NULL){
v−>next = v; // v points to itself
cursor = v;
}
// if the list is not empty
else {
v−>next = cursor−>next;
cursor−>next = v;
}
}
Similar Resources on Wayground
10 questions
pictoblox_lvl_1
Quiz
•
2nd Grade - University
10 questions
Software Engineering Unit1
Quiz
•
University
9 questions
CHAPTER 5 ONLINE QUIZ
Quiz
•
University
10 questions
ECM3434 Business Analysis 1 - Data Modelling
Quiz
•
University
10 questions
PYTHON_CHAPTER 6
Quiz
•
University
10 questions
Digital Logic
Quiz
•
12th Grade - University
10 questions
CS1010 Lab 02
Quiz
•
University
10 questions
Round - 3
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
