Search Header Logo

oop 1

Authored by laith fakhri

Information Technology (IT)

University

Used 1+ times

oop 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a constructor in a class?

To destroy the object

To initialize data members

To declare public members only

To access private members

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to access class members through a pointer?

.

,

->

::

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default access specifier for class members in C++?

public

private

protected

static

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is automatically called when an object is destroyed?

create()

delete()

constructor

destructor

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which access specifier allows class members to be accessed from outside the class?

protected

private

public

internal

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of the following statements about constructor overloading is TRUE?

Constructors must have different names.

Constructors can’t be overloaded.

Constructors can have default arguments.

Only one constructor is allowed per class

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?