
DS Lab 2
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Medium
Yasmin Kandil
Used 16+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
This part of code is a part of which function?
for (int i = mySize; i > pos; i--)
myArray[i] = myArray[i - 1];
insert
erase
display
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the capacity of a static list is fixed, what happens when you try to insert into a full list?
A new array is created
Program throws an error or terminates
The last element is overwritten
Oldest elements are deleted automatically
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes a static list?
A resizable sequence of elements
A fixed-size, array-based list
A linked list with dynamic allocation
A circular buffer
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is typically overloaded to output objects using cout?
=
[]
<<
>>
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about a constructor?
It can return a value
It must have the same name as the class
It is always private
It destroys objects
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
void print(int n) {
if (n == 0) return;
cout << n << " ";
print(n - 1);
}
What will be the output for print(3)
3 2 1
1 2 3
0 1 2
infinite recursion
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What ensures that recursion terminates?
Global Variable
Base Case
General Case
Function Overloading
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
Already have an account?
Similar Resources on Wayground
14 questions
UML - Diagrama de Classes
Quiz
•
University
15 questions
P3 IAS 2 Quiz
Quiz
•
University
11 questions
Keyboard Shortcuts
Quiz
•
5th Grade - University
12 questions
Java_Quiz_Part_2
Quiz
•
University
15 questions
Emp. Tech. 12 - Intro to MS Excel Quiz
Quiz
•
12th Grade - University
15 questions
Python_MCQ_2
Quiz
•
University
10 questions
E-R Model
Quiz
•
University
15 questions
Eval. 3B Bloque 1
Quiz
•
9th Grade - 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 Information Technology (IT)
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
