Signup/Sign In

C++ Programming MCQs Test 5

This Test will cover complete C++ with very important questions, starting off from basics to advanced level.
Q. What is an exception specification?
Q. Which of the following cannot be declared as template?
Q. Which of the following is true about const member functions?
Q. When is std::bad_alloc exception thrown?

Q. Which header file should we include for using std::auto_ptr?
Q. Which of the following member is not automatically provided by the compiler if the programmer does not provide it explicitly?
Q. What is the default inheritance type when no access specifier is explicitly specified for the base class?
Q. Which of the following casting operators use RTTI(Runtime Type Identification)?
Q. STL is based on which of the following programming paradigm?

Q. Which of the following correctly describes the meaning of namespace feature in C++?
Q. Which of the following is the most general exception handler that catches exception of 'any type'?
Q. Which of the following operators can be implemented as a non-member operator?
Q. Which of the STL containers store the elements contiguously (in adjacent memory locations)?
Q. Which of the following members occupy space in xyz object?
class XYZ {
  int mem1;
	static int mem2;
	static void foo() { }
	void bar() { }
} xyz;
Q. Which of the following operators is used to obtain the dynamic type of an object/class?

Related Tests: