Object Oriented Programming in C++ MCQ with Answers

Object Oriented Programming in C++ MCQ with Answers pdf. Object Oriented Programming using C++ Multiple Choice Questions and Answers.

Object-oriented programming (OOP) has become an essential aspect of modern software development, enabling programmers to design and develop complex applications efficiently. When it comes to OOP in the C programming language, it is crucial to have a solid understanding of its principles and concepts.

One effective way to test your knowledge on this subject is through Multiple Choice Questions (MCQs) that cover various aspects of object-oriented programming in C. This article aims to provide you with a comprehensive set of MCQs along with their answers, allowing you to assess your proficiency in OOP using C.

Whether you are a student preparing for an exam or a developer seeking to enhance your skills, these MCQs will serve as an invaluable resource for self-assessment and learning.

Object Oriented Programming

Object Oriented Programming in C++ MCQs

1. High-level languages like C and Fortran are also known as —-.
a. procedural languages
b. Object-oriented language
c. form-based language
d. both a and b
Answer: (a)

2. One of the basic concepts in Object Oriented Programming approach is bundling both data and functions into one unit known as —-.
a. Simple variable
b. object
c. bundle
d. both a and b
Answer: (b)

3. Which of the following shows the Operator overloading feature in C++
a. Polymorphism
b. inheritance
c. message passing
d. both a and b
Answer: (a)

4. One of the alternatives to nested if is the —–
a. break statement
b. Jump statement
c. switch statement
d. both a and b
Answer: (c)

5. In the switch case statement, every case should have a —- statement as the last statement
a. Jump
b. break
c. exit
d. both a and b
Answer: (b)

6. Conditional operator (?:) is a handy operator which acts as a shortcut for —-
a. if-else statement
b. switch statement
c. break statement
d. goto statement
Answer: (a)

7. —- is the ability of objects belonging to different types to respond to method calls of methods of the same name, each one according to appropriate type-specific behavior.
a. Inheritance
b. Virtuality
c. Polymorphism
d. None of these
Answer: (c)

8. In two-dimensional arrays, elements can be accessed by —– indexes.
a. One
b. four
c. three
d. two
Answer: (d)

9. Strings are nothing but —– arrays
a. character
b. integer
c. floating point
d. both c and b
Answer: (a)

10. If there is no value returned by the function, then the function return type should be specified as —–
a. void
b. Function name only
c. int
d. float
Answer: (a)

11. Every user-defined function should be declared in the program —–.
a. after it is used
b. before it is used
c. at the time of its invocation
d. both a and b
Answer: (b)

12. More than one user-defined function can have the same name and perform different operations. This is a powerful feature of C++ and is known as —-
a. inheritance
b.operator loading
c. function overloading
d. both c and b
Answer: (c)

13. If a function is declared virtual in its base class, you can still access it directly using the —-
a. Virtual Keyword
b. scope resolution Operator
c. Indirection Operator
d. Address Operator
Answer: (b)

14. Private data and functions can be accessed only by the —- of the class
a. Member data
b. member functions
c. friend function
d.both a and b
Answer: (b)

15. Constructors are member functions of a class that have the same name as the —–
a. class name name
b.data member
c. class name
d. other class data member
Answer: (c)

16. When using operator overloading, the operator should perform only the —-. Otherwise, it will lead to more confusion.
a. most obvious function
b. Local function
c. global function
d. both b and c
Answer: (a)

17. Which of the following operator cannot be overloaded?
a. Addition
b. scope resolution operator
c. multiplication
d. division
Answer: (b)

18. Operator overloading works similarly to any —– of a class
a. member function
b. friend function
c. data member
d. both b and c
Answer: (a)

19. The features of the base class are said to be inherited by the —-
a. constructor
b. Protected class
c. private class
d. derived class
Answer: (d)

20. The data members in a class are usually declared —–
a. Protected
b. public
c. private
d. both a and c
Answer: (c)

21. Data members which will be inherited will have to be declared as —–
a. protected
b. public
c. private
d. both b and c
Answer: (a)

22. Multiple Inheritances is the process of inheriting a class from —– class
a. single parent
b. more than one child
c. more than one parent
d. Only one child
Answer: (c)

23. For inheritance, parent class member functions are invoked using the —- operator
a. Dot
b. scope resolution
c. colon
d.->
Answer: (b)

24. Virtual functions are primarily used in —–
a. inheritance
b. operator overloading
c. encapsulation
d. data binding
Answer: (a)

25. The header file —- is a header file containing the declarations of cin and cout classes
a. system.h
b. Stdio.h
c. iostream.h
d . process.h
Answer: (c)

Share on Social Media

Similar Posts

15 Comments

  1. Pushpa singhaniya says:

    Superb answer. Very interesting answerπŸ˜‡πŸ˜‡

  2. The mcqs was to the point and very helpfull, it also helped me to prepare for my exam.

  3. At number 7.
    Arrays are non primitive data types but you posted it as primitive data types….kindly correct it.

  4. This site is very best for learners and I give the full support of this side !!!!

  5. What is true about Destructor?

    a) No need to write calling statement.

    b) It is automatically called before program c) Both a & b

    terminates.

    d) None of the Above

  6. It really helped to our sir, coz he is copying the questions from your site πŸ˜‚

  7. Ansari garhan says:

    Woe meri help ke liye 😊 πŸ«‚ πŸ™ 😊 πŸ«‚ πŸ™ 😊 πŸ«‚ πŸ™ 😊 πŸ«‚ πŸ™ 😊 πŸ«‚ πŸ™ 😊

Leave a Reply

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