Explore topic-wise MCQs in C++ Programming.

This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your C++ Programming knowledge and support exam preparation. Choose a topic below to get started.

1.

Which type of relationship is modelled by Association?

A. Is-A relationship
B. Has-A relationship
C. Part-Of relationship
D. Have-A relationship
Answer» C. Part-Of relationship
2.

Aggregation is a __________ type of Association relationship.

A. strong
B. weak
C. unnecessary
D. necessary
Answer» C. unnecessary
3.

Composition is a __________ type of Association relationship.

A. strong
B. weak
C. unnecessary
D. necessary
Answer» B. weak
4.

In which of the following relationship objects of related classes are strongly dependent?

A. Aggregation
B. Association
C. Composition
D. Both Composition an Association
Answer» E.
5.

In which of the following relationship objects of related classes can occur independently?

A. Aggregation
B. Association
C. Composition
D. Both Aggregation an Association
Answer» E.
6.

Which of the following relationships is uni-directional?

A. Aggregation
B. Association
C. Composition
D. Both Aggregation and Composition
Answer» E.
7.

Which type of relationship is modelled by Aggregation?

A. Is-A relationship
B. Has-A relationship
C. Part-Of relationship
D. Have-A relationship
Answer» C. Part-Of relationship
8.

Which type of relationship is modelled by Composition?

A. Is-A relationship
B. Has-A relationship
C. Part-Of relationship
D. Have-A relationship
Answer» D. Have-A relationship
9.

Composition is also a type of _______________ relationship.

A. Aggregation
B. Association
C. Inheritance
D. Both Aggregation an Association
Answer» C. Inheritance
10.

Why do we need relationships between classes?

A. To use the functionality of one class into other
B. To enhance the communication between classes
C. To increase code re-usability
D. All of the mentioned
Answer» E.
11.

How many types of Association can be there between classes?

A. 1
B. 2
C. 3
D. 4
Answer» E.
12.

How the relationship is made in Association?

A. Through the objects of classes
B. Through constructor
C. Through destructor
D. Through class Names
Answer» B. Through constructor
13.

Which type of relationship is modelled by Inheritance?

A. Is-A relationship
B. Has-A relationship
C. Part-Of relationship
D. Belongs-to relationship
Answer» B. Has-A relationship
14.

How many types of class relationships are there?

A. 1
B. 2
C. 3
D. 4
Answer» E.
15.

What is the class relationship?

A. A relationship between classes that tells how they are related
B. A relationship between classes that tells how much power one class has over other class
C. A relationship between classes that tells which parts of a class is visible to other classes
D. All of the mentioned
Answer» E.