oop 1

oop 1

University

6 Qs

quiz-placeholder

Similar activities

Inftech1

Inftech1

University

10 Qs

React and Hooks Quiz

React and Hooks Quiz

University

10 Qs

itpp unit 2

itpp unit 2

University

10 Qs

Copyright, Fair use & AI

Copyright, Fair use & AI

7th Grade - University

6 Qs

Bài 5: Kế thừa -OOP

Bài 5: Kế thừa -OOP

University

11 Qs

Практикум №1

Практикум №1

University

10 Qs

Classification Quiz

Classification Quiz

University

10 Qs

Kuis APL Seblum UTS - 4A

Kuis APL Seblum UTS - 4A

University

10 Qs

oop 1

oop 1

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

laith fakhri

Used 1+ times

FREE Resource

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