C++ Programming Free Online Test – Set 05

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 of the following is the most common way of implementing C++?

(A) C++ programs are directly compiled into native code by a compiler
(B) C++ programs are first compiled to intermediate code by a compiler and then executed by a virtual machine
(C) C++ programs are interpreted by an interpreter
(D) A C++ editor directly compiles and executes the program

Answer: (C) C++ programs are interpreted by an interpreter


Q2. Which of the following language feature is not an access specifier in C++?

(A) Public
(B) Private
(C) C protected
(D) Internal

Answer: (D) Internal


Q3. The statement i++; is equivalent to

(A) i = i + i;
(B) i = i + 1;
(C) i = i – 1;
(D) i –;

Answer: (A) i = i + i;


Q4. Which of the following library function below by default aborts the program?

(A) Terminate()
(B) end()
(C) Abort()
(D) exit()

Answer: (D) exit()


Q5. Which of the following operators can be overloaded?

(A) . (dot or member access operator)
(B) & (address-of operator)
(C) size-of operator
(D) ?: (conditional operator)

Answer: (D) ?: (conditional operator)


Q6. What is shallow copy?

(A) A shallow copy creates a copy of the dynamically allocated objects too
(B) A shallow copy just copies the values of the data as they are
(C) A shallow copy creates a copy of the statically allocated objects too
(D) Both b and c above

Answer: (B) A shallow copy just copies the values of the data as they are


Q7. Value of ix+j, if i, j are integer type and ix long type would be

(A) Integer
(B) Float
(C) Long integer
(D) Double precision

Answer: (B) Float


Q8. Which of the following languages is a subset of C++ language?

(A) C language
(B) Java Language
(C) C# language
(D) language

Answer: (D) language


Q9. If a member needs to have unique value for all the objects of that same class, declare the member as

(A) Global variable outside class
(B) Local variable inside constructor
(C) Static variable inside class
(D) Dynamic variable inside class

Answer: (A) Global variable outside class


Q10. In C language, a hexadecimal number is represented by writing

(A) x
(B) xo
(C) ox
(D) h

Answer: (B) xo


Q11. Which of the following below can perform conversions between pointers to related classes?

(A) a.A. cast_static
(B) b.B. dynamic_cast
(C) c.c. static_cast
(D) d.D. cast_dynamic

Answer:(C) c.c. static_cast


Q12. How do we declare an ‘interface’ class?

(A) By making all the methods pure virtual in a class
(B) By making all the methods abstract using the keyword ‘abstract’ in a class
(C) By declaring the class as interface with the keyword ‘interface’
(D) It is not possible to create interface class in C++

Answer: (A) By making all the methods pure virtual in a class


Q13. Which of the following below is /are a valid iterator type?

(A) Input Iterator
(B) Backward Iterator
(C) Forward Iterator
(D) Both (a) and (c) above

Answer: (A) Input Iterator


Q14. What defines a general set of operations that will be applied to various types of data?

(A) Template class
(B) Function template
(C) Class template
(D) Both (a) and (c) above

Answer: (D) Both (a) and (c) above


Q15. What is deep copy?

(A) A deep copy creates a copy of the dynamically allocated objects too
(B) A deep copy just copies the values of the data as they are
(C) A deep copy creates a copy of the statically allocated objects too
(D) Both (b) and (c) above

Answer: (B) A deep copy just copies the values of the data as they are


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