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
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.
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: 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: Option D
5. Classes that can be used to instantiate objects are called concrete classes.
6. What is default visibility mode for members of classes in C++ ?
7. Which is more memory efficient ?
- both use same memory
- depends on a programmer
Answer: Option B