C++ Test

Exam Type: C++ MCQ Skill Test
Questions Type: Multiple Choice Questions
Total Questions: 43
Time Limit: 30 Minutes
Last Update June, 2025

Pass C++ Exam

75%
Total time

1 minute 2 seconds

Total time

1 correct answers

Total time

6 incorrect answers

Total time

6 not attempted

Start

C++ Quiz

Question 1 of 43
30:00

Which of the following techniques should you use to handle a constructor that fails?

Note: Select more than 1 option as correct answer

Which of the following operators cannot be overloaded?

Note: Select more than 1 option as correct answer

If a matching catch handler (or ellipsis catch handler) cannot be found for the current exception, then the following predefined runtime function is called ______.

Which of the following sets of functions do not qualify as overloaded functions?

What access specifier allows only the class or a derived class to access a data member

Which of the following are true about class member functions and constructors?

Which of the following is a predefined object in C++ and used to insert to the standard error output?

A pure virtual function can be declared by _______.

Note: Select more than 1 option as correct answer

Which of the following statements regarding functions are false?

Base class members are made accessible to a derived class and inaccessible to rest of the program by _____.

What linkage specifier do you use in order to cause your C++ functions to have C linkage

Which of the following statements are true for operator overloading in C++?

Note: Select more than 1 option as correct answer

Which of the following statements about function overloading, is true?

Which of the following statements are true about C++ vector class?

Note: Select more than 1 option as correct answer

In C++, the keyword auto can be used for:

What does ADT stand for?

Which of the following is NOT a standard sorting algorithm:

Which of the following are NOT valid C++ casts

Which of the following is not a standard STL header?

You want the data member of a class to be accessed only by itself and by the class derived from it. Which access specifier will you give to the data member?

Which of the following statements are true?

Note: Select more than 1 option as correct answer

How many arguments can be passed to an overloaded binary operator?

Note: Select more than 1 option as correct answer

Which of the following statements about constructors and destructors are true?

Note: Select more than 1 option as correct answer

Which of the following techniques should you use to handle a destructor that fails?

Which of the following are true about class and struct in C++:

Note: Select more than 1 option as correct answer

Which of the following statements are FALSE with regard to destructors

Note: Select more than 1 option as correct answer

No, var1 and var2 are not functions but are variables

Note: Select more than 1 option as correct answer

which of the following is true.

Which of the following STL classes is deprecated (i.e should no longer be used)?

If input and output operations have to be performed on a file, an object of the _______ class should be created.

Which of the following member functions can be used to add an element in an std::vector?

Consider the sample code given below and answer the question that follows. class Outer { public: class Inner { int Count; public: Inner(){}; }; }; int main() { Inner innerObject; Outer outObject; return 0; } What will be the result when the above code is compiled?

Consider the sample code given below and answer the question that follows. class Person { public: Person(); virtual ~Person(); }; class Student : public Person { public: Student(); ~Student(); }; main() { Person *p = new Student(); delete p; } Why is the keyword "virtual" added before the Person destructor?

Suppose MyClass is a class that defines a copy constructor and overloads the assignment operator. In which of the following cases will the copy constructor of MyClass be called?

Note: Select more than 1 option as correct answer

Which of the following types of inheritance supported in C++?

Which of the following is not a member of a class?

What happens when a handler is not found for a given exception?

How many number of arguments can a destructor of a class receives?

Runtime polymorphism is achieved only when a virtual function is accessed through a ____ to the base class.

Which operator is used to allocate memory?

Which of the following storage classes are supported in C++?

Note: Select more than 1 option as correct answer

Which statement is correct?

The stream ‘cout’ is by default connected to console output ___.

C++ Test Explained

© 2025 Skill Test Answer. All Rights Reserved