Object Oriented Programming in c++ Questions and Answers pdf – Set 24

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 newline character is always included between

(A) Pair of parentheses
(B) Pair of curly braces
(C) Control string
(D) &

Answer: (C) Control string


Q2. You define a structure type globally because __

(A) You save many lines of code by not rewriting an identical structure definition in each function that uses it
(B) You will never change its definition
(C) It is required in C++
(D) All of the above

Answer: (A) You save many lines of code by not rewriting an identical structure definition in each function that uses it


Q3. Which of the following are valid characters for a numeric literal constant?

(A) A comma
(B) A dollar sign ($)
(C) A percent sign (%)
(D) None of the above

Answer: (D) None of the above


Q4. Overloaded functions are required to

(A) Have the same return type
(B) Have the same number of parameters
(C) Perform the same basic functions
(D) None of the above

Answer: (D) None of the above


Q5. If you create an instantiation of a class template with an int, and then create a second instantiation with a double, then

(A) You must precede each function call with the word int or double
(B) Once a function is used as one type, it becomes unavailable for use with the other type
(C) There is no difference in the procedure to call a member function
(D) You cannot perform this operation in C++

Answer: (A) You must precede each function call with the word int or double


Q6. The main difference in operation between an ‘if statement and a ‘while’ statement is

(A) The ‘while’ loop body is executed
(B) The body of the ‘while’ statement may be executed many times, the body of the ‘if statements only once
(C) The conditional expression following the keyboard is evaluated differently
(D) None of the above

Answer: (B) The body of the ‘while’ statement may be executed many times, the body of the ‘if statements only once


Q7. Which of the following is the scope resolution operator?

(A) ->>
(B) ::
(C) *
(D) &

Answer: (B) ::


Q8. The weakest form of cohesion is

(A) Coincidental
(B) Functional
(C) Logical
(D) Communicational

Answer: (A) Coincidental


Q9. A function’s single most important role is to

(A) Give a name to a block of code
(B) Reduce program size
(C) Accept arguments and provide a return value
(D) Help organize a program into conceptual units

Answer: (D) Help organize a program into conceptual units


Q10. A function that is called automatically each time an object is created is a(n)

(A) Constructor
(B) Contractor
(C) Builder
(D) Architect

Answer: (A) Constructor


Q11. The function printDataMembers() is not likely a(n) __

(A) Inspector functions
(B) Mutator functions
(C) Auxiliary functions
(D) Manager functions

Answer:(A) Inspector functions


Q12. The statement int n[4] = {11, -13, 17, 105};

(A) Assigns the value -13 to [2]
(B) Assigns the value 17 to n[2]
(C) Is wrong; it gives an error message
(D) Assigns the value 18 to n[2]

Answer: (B) Assigns the value 17 to n[2]


Q13. Which of the following statements creates and initializes a pointer named salesPtr?

(A) salesPtr = NULL;
(B) *salesPtr = “”;
(C) float &salesPtr = NULL;
(D) float *salesPtr = NULL;

Answer: (D) float *salesPtr = NULL;


Q14. Which of the following are void functions?

(A) main
(B) pow
(C) sqrt
(D) All of the above

Answer: (A) main


Q15. Access specifiers are followed by

(A) A comma
(B) A semicolon
(C) A colon
(D) Two colons

Answer: (C) A colon


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