Computer Based Test C++ Programming – Set 04

Are you guys looking for computer science MCQ Questions with Answers PDF Free Download as per computer science 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. Each question has four options followed by the right answer. These computer science MCQ Questions are selected supported by the newest exam pattern.


Q1. Which looping process checks the test condition at the end of the loop?

(A) for
(B) while
(C) do-while
(D) no looping process checks the test condition at the end

Answer: (A) for


Q2. Which of the following is not a file operation?

(A) Repositioning
(B) Truncating
(C) Appending
(D) None of above

Answer: (A) Repositioning


Q3. What is the Difference between struct and class in terms of Access Modifier?

(A) By default all the struct members are private while by default class members are public
(B) By default all the struct members are protected while by default class members are private
(C) By default all the struct members are public while by default class members are private
(D) By default all the struct members are public while by default class members are protected

Answer: (B) By default all the struct members are protected while by default class members are private


Q4. Which looping process is best used when the number of iterations is known?

(A) for
(B) while
(C) do-while
(D) All looping processes require that the iterations be known

Answer: (C) do-while


Q5. The default access level assigned to members of a class is __

(A) Private
(B) Public
(C) Protected
(D) Needs to be assigned

Answer: (C) Protected


Q6. What happens when a pointer is deleted twice?

(A) It can abort the program
(B) It can cause a failure
(C) It can cause an error
(D) It can cause a trap

Answer: (C) It can cause an error


Q7. Inline functions are invoked at the time of

(A) Run time
(B) Compile time
(C) Depends on how it is invoked
(D) Both b and c above

Answer: (C) Depends on how it is invoked


Q8. In a C language ‘3’ represents

(A) A digit
(B) An integer
(C) A character
(D) A word

Answer: (A) A digit


Q9. Which of the following language is not supported by C++?

(A) Exception Handling
(B) Reflection
(C) Operator Overloading
(D) Namespaces

Answer: (D) Namespaces


Q10. Expression C=i++ causes

(A) Value of i assigned to C and then i incremented by 1
(B) i to be incremented by 1 and then value of i assigned to C
(C) Value of i assigned to C
(D) i to be incremented by 1

Answer: (D) i to be incremented by 1


Q11. What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);

(A) The question mark should be an equal sign
(B) The first semicolon should be a colon
(C) There are too many variables in the statement
(D) The conditional operator is only used with apstrings

Answer: (D) The conditional operator is only used with apstrings


Q12. What’s wrong? while( (i < 10) && (i > 24))

(A) The logical operator && cannot be used in a test condition
(B) The while loop is an exit-condition loop
(C) The test condition is always false
(D) The test condition is always true

Answer: (D) The test condition is always true


Q13. Class derived: public base1, public base2 { } is an example of

(A) Polymorphic inheritance
(B) Multilevel inheritance
(C) Hierarchical inheritance
(D) Multiple inheritance

Answer: (B) Multilevel inheritance


Q14. Under which of the following circumstances, synchronization takes place?

(A) When the file is closed
(B) When the buffer is empty
(C) Explicitly, with manipulators
(D) Both (a) and (c)

Answer: (B) When the buffer is empty


Q15. A continue statement causes execution to skip to

(A) The return 0; statement
(B) The first statement after the loop
(C) The statement following the continue statement
(D) The next iteration of the loop

Answer: (C) The statement following the continue statement


C++ Programming MCQ – All Set

C++ Programming MCQ Practice Test – Set 01
Computer Programming using C++ Objective Test – Set 02
C++ Programming Online Practice Test – Set 03
Computer Based Test C++ Programming – Set 04
C++ Programming Free Online Test – Set 05

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

Leave a Comment