MSBTE I Scheme Practice MCQs of “Object
Oriented Programming using C++ (22316)”
UNIT-2. Classes and Objects.
1. |
What happens when we try to
compile the class definition in following code snippet? class Birds {}; class Peacock : protected Birds {}; |
|||||||
Answer: Option D Explanation: No answer description available
for this question. |
2. |
Which of the following
statements is incorrect? |
|||||||
Answer: Option D Explanation: No answer description available
for this question. |
3. |
Which of the following
statement is correct regarding destructor of base class? |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
4. |
Which of the following two
entities (reading from Left to Right) can be connected by the dot operator? |
|||||||
Answer: Option D Explanation: No answer description available
for this question. |
5. |
How can we make a class
abstract? |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
6. |
Which of the following
statements is correct when a class is inherited publicly? |
|||||||
Answer: Option D Explanation: No answer description available
for this question. |
7. |
Which of the following
statements is correct about the constructors and destructors? |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
8. |
Which of the following access
specifies is used in a class definition by default? |
|||||||
Answer: Option C Explanation: No answer description available
for this question. |
9. |
Which of the following
statement is correct with respect to the use of friend keyword inside a
class? |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
10. |
Which of the following keywords
is used to control access to a class member? |
|||||||
Answer: Option C Explanation: No answer description available
for this question |
||||||||
11. |
Which of the following can
access private data members or member functions of a class? |
|||||||
Answer: Option C Explanation: No answer description available
for this question. |
12. |
Which of the following type of
data member can be shared by all instances of its class? |
|||||||
Answer: Option C Explanation: No answer description available
for this question. |
13. |
Which of the following also
known as an instance of a class? |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
14. |
Constructor is executed when
_____. |
|||||||
Answer: Option A Explanation: No answer description available
for this question. |
15. |
Which of the following
statements about virtual base classes is correct? |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
16. |
How many objects can be created
from an abstract class? |
|||||||
Answer: Option A Explanation: No answer description available
for this question. |
17. |
What does the class definitions
in following code represent? class Bike {
Engine objEng; }; class Engine { float CC; }; |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
18. |
Which of the following
statements is correct when a class is inherited privately? |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
19. |
Which of the following
statements is correct? |
|||||||
Answer: Option B Explanation: No answer description available
for this question. |
20. |
What does a class hierarchy
depict? |
|||||||
Answer: Option C Explanation: No answer description available
for this question. |