Following quiz provides Multiple Choice Questions (MCQs) related to C++ Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
The purpose of the constructor cannot be overridden in the derived class hence constructor cannot be a virtual.
Q 2 - Choose the respective delete operator usage for the expression ‘ptr=new int’.
Q 3 - Operators sizeof and ?:
Both the mentioned operators cannot be overloaded.
Q 4 - How can we make an class act as an interface in C++?
There are no keywords in C++ such as abstract and interface.
Q 5 - What is the full form of RTTI.
Q 6 - With respective to streams >> (operator) is called as
It extracts the data from stream into variables.
Q 7 - i) Exception handling technically provides multi branching.
ii) Exception handling can be mimicked using ‘goto’ construct.
goto just does the unconditional branching.
The size of ‘int’ depends upon the complier i.e. whether it is a 16 bit or 32 bit.
g++ is GNU C++ compiler for linux. Borland and vc++ (Microsoft visual c++) for windows.
Q 10 - What is the built in library function to compare two strings?
strcmp() is the built in function from “string.h” to compare two strings. Returns 0 if both are same strings. Returns -1 if first < second string. Returns 1 first > second.