Object Oriented Programming using c++ mcq Test – Set 22

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. To expose a data member to the program, you must declare the data member in the __ section of the class

(A) Common
(B) Exposed
(C) Public
(D) Unrestricted

Answer: (C) Public


Q2. The step-by-step instructions that solve a problem are called __

(A) An algorithm
(B) A list
(C) A plan
(D) A sequential structure

Answer: (A) An algorithm


Q3. Using the wardrobe structure within the ShopList structure is an example of a good programming principle, known as _

(A) Reusability
(B) Polymorphism
(C) Redundancy
(D) Recursion

Answer: (A) Reusability


Q4. Which of the following statements allows the user to enter data at the keyboard?

(A) cin << currentPay; (B) cin >> currentPay;
(C) cout << currentPay; (D) cout >> currentPay;

Answer: (B) cin >> currentPay;


Q5. Some Streams work with input, and some with output

(A) True
(B) False

Answer: (A) True


Q6. Which of the following is false?

(A) You enclose a function’s statements in a set of braces
(B) The function header is considered a C++ statement, so it must end in a semicolon
(C) The keyword void tells the C++ compiler that the function does not return a value
(D) A function can receive information that you send (pass) to it

Answer: (B) The function header is considered a C++ statement, so it must end in a semicolon


Q7. The int type of constants are whole numbers in the range

(A) – 23677 to 23678
(B) – 32768 to 32767
(C) – 32767 to 32768
(D) – 32864 to 32865

Answer: (B) – 32768 to 32767


Q8. The major advantage of data hiding is that __

(A) Your programs can include more data
(B) You no longer need functions
(C) No one can ever use your data
(D) Your data will be used correctly

Answer:(D) Your data will be used correctly


Q9. Which functions do not have a ‘this’ pointer?

(A) Access functions
(B) Inspector functions
(C) Member functions
(D) Static functions

Answer: (D) Static functions


Q10. The comma operator (,) is used to

(A) Permit two different expressions to appear in situations where only one expression would ordinarily be used
(B) Terminate loops or to exit from switch
(C) Alter the normal sequence of program execution by transferring control to some other part of the program
(D) Carry out a logical test and then take one of two possible actions, depending upon the outcome of the test

Answer: (A) Permit two different expressions to appear in situations where only one expression would ordinarily be used


Q11. Which of the following is an access specifier?

(A) Particular
(B) Shielded
(C) Protected
(D) Safe

Answer: (C) Protected


Q12. Which of the following statements declares a variable that can contain a decimal number?

(A) dec payRate;
(B) dec hourlyPay
(C) float payRate
(D) float hourlyPay;

Answer: (D) float hourlyPay;


Q13. When all of the operations in a function contribute to the performance of only one task, a function has

(A) Singular cohesion
(B) Tight cohesion
(C) Functional cohesion
(D) Sequential cohesion

Answer: (C) Functional cohesion


Q14. A C++ statement must end in a

(A) : (column)
(B) , (comma)
(C) . (period)
(D) ; (semicolon)

Answer: (D) ; (semicolon)


Q15. The data type listed at the beginning of a value-returning function’s header indicates the type of data the function will _

(A) Return
(B) Pass
(C) Receive
(D) All of the above

Answer: (A) Return


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