OOP2023_P1_B9A_March28

OOP2023_P1_B9A_March28

University

5 Qs

quiz-placeholder

Similar activities

Java fundamentals

Java fundamentals

University

10 Qs

Windows Basics

Windows Basics

10th Grade - Professional Development

10 Qs

Best Practices in Java

Best Practices in Java

University

10 Qs

HTML Basics

HTML Basics

9th Grade - Professional Development

9 Qs

Lesson 9 Knowledge Assessment

Lesson 9 Knowledge Assessment

6th Grade - University

10 Qs

JAVA

JAVA

7th Grade - Professional Development

6 Qs

Static routing

Static routing

University

10 Qs

QUIZ 2

QUIZ 2

University

10 Qs

OOP2023_P1_B9A_March28

OOP2023_P1_B9A_March28

Assessment

Quiz

Computers

University

Hard

Created by

MR ARORA

Used 1+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is a limitation of using friend functions in C++?

They can access private members of the class

They can be called from anywhere in the program

They cannot be overloaded

They can lead to less secure code if used improperly.

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the purpose of constructors in C++?

To allocate memory for objects

To initialize the data members of objects

To deallocate memory for objects

To create new objects

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is true about constant objects in C++?

The member functions of a constant object can modify the object.

A constant object cannot be used as an argument to a non-const member function.

The data members of a constant object can be modified.

A constant object can be created only with a parameterized constructor.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Default Constructor

Parameterized Constructor: 10

Destructor

Parameterized Constructor: 5

Destructor

Default Constructor

Parameterized Constructor: 10

Destructor

Destructor

Parameterized Constructor: 5

Destructor

Default Constructor

Parameterized Constructor: 10

Parameterized Constructor: 5

Destructor

Destructor

Destructor

Default Constructor

Parameterized Constructor: 10

Destructor

Parameterized Constructor: 5

Destructor

Destructor

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is a disadvantage of using friend functions in C++?

It violates encapsulation

It makes the code difficult to read

It makes the code less efficient

None of the above