Object Oriented Programming with c++ Exam Questions – Set 27

Are you guys looking for Computer science Engineering MCQ Questions with Answers PDF Free Download as per Computer science Engineering new exam pattern? You came to the right page. This may assist you to understand and check your knowledge about the Subjects. Students also can take a free test of the Multiple Choice Questions of Computer science Engineering. Each question has four options followed by the right answer. These Computer science Engineering MCQ Questions are selected supported by the newest exam pattern.


Q1. The _ mode tells C++ to open a file for input

(A) add::ios
(B) in::file
(C) ios::app
(D) ios::in

Answer: (D) ios::in


Q2. Redirection redirects

(A) A stream from a file to the screen
(B) A file from a device to a stream
(C) A device from the screen to a file
(D) The screen from a device to a stream

Answer: (A) A stream from a file to the screen


Q3. You mark the beginning of a function’s block of code with the __

(A) /
(B) *
(C) {
(D) }

Answer: (C) {


Q4. When a child class function is called, the compiler looks first for a matching function name in the _

(A) Class of the object using the function name
(B) Immediate ancestor class
(C) Base class
(D) Descendant class

Answer: (A) Class of the object using the function name


Q5. When a class serves as a base class to others, _

(A) All of its members are inherited
(B) All of its members are inherited, except for any private members
(C) All of its members are inherited, except for any protected members
(D) None of its members is inherited unless specifically “listed

Answer: (B) All of its members are inherited, except for any private members


Q6. The return type for all destructors is

(A) The class
(B) Void
(C) The same as the first data in the class
(D) None

Answer: (D) None


Q7. When the function void someFunction(int x) throw(char) is executed, _

(A) It will throw nothing
(B) It may throw an integer
(C) It may throw a character
(D) It may not throw anything

Answer: (C) It may throw a character


Q8. Variables that hold memory addresses are called __

(A) Subscripts
(B) Holders
(C) Pointers
(D) Indicators

Answer: (C) Pointers


Q9. The declaration section holds

(A) Data members
(B) Data members and function prototypes
(C) Data members, function prototypes, and the functions themselves
(D) None of the above

Answer: (B) Data members and function prototypes


Q10. To be called object-oriented, a programming language must allow

(A) Functions that return only a single value
(B) #include files
(C) Inheritance
(D) All of the above

Answer:(C) Inheritance


Q11. Assume a class Derv that is privately derived from class Base. An object of class Derv located in main() can access

(A) Public members of Base
(B) Protected members of Base
(C) Private members of Base
(D) Public members of Derv

Answer: (A) Public members of Base


Q12. A data member holds a 1 or 0 depending on whether taxes have been paid. The best identifier for this member is _

(A) taxes
(B) paidTaxes
(C) taxesArePaid
(D) code

Answer: (B) paidTaxes


Q13. A pattern for creating an object is called a(n) _

(A) Class
(B) Attributes
(C) Private
(D) Public

Answer:(A) Class


Q14. Hiding individual components of an entry is _

(A) Polymorphism
(B) Encapsulation
(C) Scaling
(D) Not recommended in C++

Answer: (B) Encapsulation


Q15. When a function performs tasks based on a decision, it has __

(A) Functional cohesion
(B) Coincidental cohesion
(C) Logical cohesion
(D) No cohesion

Answer: (C) Logical cohesion


We hope the given Computer science Engineering MCQ Questions with Answers will definitely yield fruitful results. Hope you got enough ideas on the MCQs on Computer science Engineering. If you have any queries related toComputer science Engineering MCQs Multiple Choice Questions with Answers, drop your questions below and will get back to you in no time.

Leave a Comment

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

Scroll to Top