C++ Programming MCQ Practice Test – Set 01

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 not a valid conditional inclusion in preprocessor directives?

(A) #ifdef
(B) #ifundef
(C) #endif
(D) #elif

Answer: (A) #ifdef


Q2. Which of the following is not recommended in a header file?

(A) Type definitions (typedefs)
(B) Class definitions
(C) Function definitions
(D) Template definitions

Answer: (D) Template definitions


Q3. Which of the following is not a component of file system?

(A) Access method
(B) Auxiliary storage management
(C) Free integrity mechanism
(D) None of the above

Answer: (C) Free integrity mechanism


Q4. Which one of the following is not a fundamental data type in C++

(A) float
(B) string
(C) int
(D) wchar_t

Answer: (A) float


Q5. Which of the STL containers store the elements contiguously (in adjacent memory locations)?

(A) std::vector
(B) std::list
(C) std::map
(D) std::set

Answer: (C) std::map


Q6. Seek time is

(A) Time taken to retrieve a data
(B) Time taken by read/write head mechanism to position itself over appropriate cylinder
(C) Time taken by appropriate sector to come under read/write
(D) None of the above

Answer: (D) None of the above


Q7. Which of the following correctly describes C++ language?

(A) Statically typed language
(B) Dynamically typed language
(C) Both Statically and dynamically typed language
(D) Type-less language

Answer: (D) Type-less language


Q8. What does STL stand for?

(A) Simple Template Library
(B) Standard Template Library
(C) Static Type Library
(D) Single Type-based Library

Answer: (B) Standard Template Library


Q9. ‘Prime area’ in context of file system is defined as

(A) It is memory area created by operating system
(B) It is an area into which data records are written
(C) It is the main area of a web page
(D) None of the above

Answer: (B) It is an area into which data records are written


Q10. Which of the following is the most preferred way of throwing and handling exceptions?

(A) Throw by value and catch by reference
(B) Throw by reference and catch by reference
(C) Throw by value and catch by value
(D) Throw the pointer value and provide catch for the pointer type

Answer: (B) Throw by reference and catch by reference


Q11. If the class name is X, what is the type of its “this” pointer (in a non-static, non-const member function)?

(A) const X* const
(B) X* const
(C) X*
(D) X&

Answer: (D) X&


Q12. In multi-list organization

(A) Records that have equivalent value for a given secondary index item are linked together to form a list
(B) Records are loaded in ordered sequence defined by collating sequence by content of the key
(C) Records are directly accessed by record key field
(D) None of the above

Answer: (B) Records are loaded in ordered sequence defined by collating sequence by content of the key


Q13. What is the implicit pointer that is passed as the first argument for non-static member functions?

(A) ‘self’ pointer
(B) std::auto_ptr pointer
(C) ‘Myself’ pointer
(D) ‘this’ pointer

Answer: (D) ‘this’ pointer


Q14. Which one of the following is not a valid reserved keyword in C++

(A) Explicit
(B) Public
(C) Implicit
(D) Private

Answer: (C) Implicit


Q15. Which of the following keyword supports dynamic method resolution?

(A) Abstract
(B) Virtual
(C) Dynamic
(D) Typeid

Answer: (A) Abstract


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