Here is a listing of C++ Questions & Answers focuses 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: We can include the group of code by using the #include header file.
To practice all areas of C++ language, here is complete set of 1000+ Multiple Choice Questions and Answers.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Practice Computer Science MCQs
- Apply for C++ Internship
- Check C++ Books
- Apply for Computer Science Internship
- Check Programming Books