250+ TOP MCQs on Modularization and Interfaces and Answers

This section on C++ quiz on “Modularization and Interfaces”. One shall practice these online quizzes to improve their C++ programming skills needed for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive exams. These questions can be attempted by anyone focusing on learning C++ programming language. They can be a beginner, fresher, engineering graduate or an experienced IT professional. Our C++ quiz comes with the detailed explanation of the answers which helps in better understanding of C++ concepts.

Here is a listing of C++ quiz on “Modularization and Interfaces” along with answers, explanations and/or solutions:

1. which of the following is used to implement the c++ interfaces?
a) absolute variables
b) abstract classes
c) constant variables
d) default variables
Answer: b
Clarification: Abstract classes in C++ are purposely defined for making base classes containing atleast one virtual function which can be overloaded on inheritance, which means single function name for different sub-classes, hence acts as an interface.

2. What is the ability to group some lines of code that can be included?
in the program?
a) specific task
b) program control
c) modularization
d) macros
Answer: c
Clarification: Modularization is also similar to macros but it is used to build large projects.

3. How many types do functions fall depends on modularization?
a) 1
b) 2
c) 3
d) 4
Answer: b
Clarification: There are two types of functions. They are program control and specific task.

4. How many types of modularization are there in c++?
a) 4
b) 3
c) 1
d) 2

Answer: d
Clarification: There are two types of modular programming. They are interface and implementation.

5. What does the client module import?
a) macro
b) records
c) interface
d) instance
Answer: c
Clarification: Because they access the functions in the module user interface.

6. Identify the correct statement.
a) c++ does not have built-in interfaces
b) c++ does have built-in interfaces
c) c++ have no concept of interfaces
d) c++ does have built-in interfaces & classes
Answer: a
Clarification: Unlike other programming languages like Java and others, C++ has no inbuilt interfaces.

7. What is similar to the interface in c++?
a) methods
b) instance of a class
c) pure abstract class
d) methods & instance of a class
Answer: c
Clarification: Pure abstract classes in C++ are a type of interface because it contains only abstract member functions and no data or concrete member functions.

8. Which of the following implements the module in the program?
a) macro
b) header files
c) macro & header files
d) interfaces
Answer: b
Clarification: We can include the group of code by using the #include header file.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top