C++ Programming Questions Answers - Set 2
-
1. What is data hiding ?
- It is related with hiding internal object details
- It is related with showing internal object details
- It is related with datatypes
- None of above
Answer And Explanation
Answer: Option A
-
2. What is class in c++ ?
- When you define a class, you define a blueprint for a data type.
- When you define a class, you make get more funtionality.
- When you define a class, you define the logic.
- When you define a class, you make debugging.
Answer And Explanation
Answer: Option A
-
3. What is object in C++ ?
- Object is part of syntax of a class.
- Object is datatype of a class.
- Object is an instance of a class.
- Object is function of a class.
Answer And Explanation
Answer: Option C
-
4. What is purpose of abstract class ?
- to provide help with database connectivity.
- to provide data input to other classes.
- to provide security to other classes.
- to provide an appropriate base class from which other classes can inherit.
Answer And Explanation
Answer: Option D
-
5. Classes that can be used to instantiate objects are called concrete classes.
- True
- False
Answer And Explanation
Answer: Option A
-
6. What is default visibility mode for members of classes in C++ ?
- Private
- Public
- Protected
- Depends
Answer And Explanation
Answer: Option A
-
7. Which is more memory efficient ?
- structure
- union
- both use same memory
- depends on a programmer
Answer And Explanation
Answer: Option B