Object Oriented Programming using c++ Multiple Choice Questions & Answers – Set 21

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 logical NOT operator represented by is a

(A) Unary operator
(B) Binary operator
(C) Ternary operator
(D) Octal operator

Answer: (A) Unary operator


Q2. The generic type in a template function

(A) Must be T
(B) Can be T
(C) Cannot be T for functions you create, but may be for C++’s built-in functions
(D) Cannot be T

Answer:(B) Can be T


Q3. Which of the following assigns the number 5 to the area variable?

(A) area 1 = 5
(B) area = 5
(C) area == 5
(D) area –> 5

Answer: (B) area = 5


Q4. Which of the following statements is false?

(A) A function is a block of code that performs a specific task
(B) Functions allow programmers to break large and complex problems into small and manageable tasks
(C) Functions allow programmers to use existing code to perform common tasks
(D) Functions can be called, or invoked, only once in a program

Answer: (D) Functions can be called, or invoked, only once in a program


Q5. Two access specifers in C++ are

(A) public and private
(B) int and double
(C) formal and informal
(D) void and free

Answer: (A) public and private


Q6. You can use C++ as a procedural, as well as an object-oriented, language

(A) True
(B) False

Answer: (A) True


Q7. If the description of function is “input the quantity, validate that the quantity is greater than 1, subtract 1 from the quantity, and print the quantity,” the function is

(A) Sequentially cohesive
(B) Logically cohesive
(C) Communicationally cohesive
(D) Functionally cohesive

Answer: (B) Logically cohesive


Q8. Which of the following is NOT included in the header of a function?

(A) The type of variable returned by the function to the function that calls it
(B) The name of the program or function that calls the function
(C) The name of the function
(D) The types and names of any variables that will be passed to the function

Answer: (B) The name of the program or function that calls the function


Q9. The extraction operator >> is a(n) __

(A) Overloaded function
(B) C++ class
(C) C++ object
(D) Static reference variables

Answer: (A) Overloaded function


Q10. The general form of do-while statement is

(A) do expression while statement;
(B) do while expression;
(C) do statement while (expression);
(D) do statement while statement;

Answer: (C) do statement while (expression);


Q11. An object is __

(A) A category of classes
(B) A name given to a class
(C) An instance of a class
(D) The same as a class

Answer:(C) An instance of a class


Q12. If a class will serve as a base class, most often the base class data members are

(A) Private
(B) Protected
(C) Public
(D) Polymorphic

Answer: (C) Public


Q13. The switch variable can be of

(A) int type only
(B) char type only
(C) Both int as well as char type
(D) Float type only

Answer: (C) Both int as well as char type


Q14. The following statement where T is true and F is false T&&T||F&&T

(A) Is true
(B) Is false
(C) Is wrong
(D) Not applicable in C language

Answer: (A) Is true


Q15. Which of the following is a valid condition for an if statement? (The condition should be both syntactically and logically valid.)

(A) (age) > 65
(B) (age > 0 and < 10) (C) (sales > 500 && < 800) (D) (sales > 100 && sales <= 1000)

Answer: (D) (sales > 100 && sales <= 1000)


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