OOP2023_P1_B11B12_March27

Quiz
•
Computers
•
University
•
Hard
MR ARORA
Used 1+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following statements about the this pointer is false?
The this pointer is a keyword in C++ that refers to the object that is currently being operated on.
The this pointer can be used to access member variables and member functions of the current object.
The this pointer is not a constant pointer and can be reassigned to point to a different object.
The this pointer is automatically passed as a hidden argument to all non-static member functions.
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following code snippets correctly uses new and delete to allocate and deallocate a dynamic array of pointers with a size of 5?
int *arr = new int[5];
delete[] arr;
int *arr = new int*[5];
delete[] arr;
int *arr = new int*[5];
delete[] *arr;
int *arr = new int[5]();
delete[] arr;
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Predict the output of the given code.
1 and 3
Run time error
10 and 2
Compile time error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of the given code.
Default constructor called.
Parameterized constructor called with 42.
Destructor called.
Destructor called.
Default constructor called.
Parameterized constructor called with 42.
Destructor called.
Default constructor called.
Destructor called.
Default constructor called.
Destructor called.
Default constructor called.
Destructor called.
Parameterized constructor called with 42.
Destructor called.
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is true about friend functions in C++?
They can be called only from within the class
They cannot be overloaded
They can be defined in the class or outside the class
They can be inherited by derived classes
Similar Resources on Wayground
6 questions
Arrays I

Quiz
•
University
10 questions
exception

Quiz
•
University
10 questions
C Quiz-IT-B(Arrays & Pointers)

Quiz
•
University
10 questions
Quiz 3

Quiz
•
University
10 questions
Bahasa Pemrograman Python

Quiz
•
University
10 questions
Array in C

Quiz
•
University
10 questions
Arrays

Quiz
•
11th Grade - University
10 questions
Ôn tập CSLT

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University