How many ways are there to initialize int with a constant?
1
2
3
4
Q.2.
What is the user-defined header file extension in c++?
cpp
h
hf
none of these
Q.3.
Which of the following can derived class inherit?
members
functions
both a & b
None of the above
Q.4.
How many types of macros are there in c++?
1
2
3
4
Q.5.
How many ways of reusing are there in class hierarchy?
1
2
3
4
Q.6.
How many parameters are present in mismatch method in non-sequence modifying algorithm?
1
2
3
4
Q.7.
What of the following describes protected access specifier?
The variable is visible only outside inside the block
The variable is visible everywhere
The variable is visible to its block and to it’s derived class
None of these
Q.8.
What will happen when introduce the interface of classes in a run-time polymorphic hierarchy?
Separation of interface from implementation
Merging of interface from implementation
Separation of interface from debugging
None of the mentioned
Q.9.
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is
int **fun(float**, char**)
int *fun(float*, char*)
int ***fun(float*, char**)
int ***fun(*float, **char)
Q.10.
In which of the following we cannot overload the function?
return function
caller
called function
none of the mentioned
Q.11.
How to handle error in the destructor?
throwing
terminate
both a & b
none of the mentioned
Q.12.
What is meant by pure virtual function?
Function which does not have definition of its own.
Function which does have definition of its own.
Function which does not have any return type.
None of the mentioned
Q.13.
Which keyword is used to declare the min and max functions?
iostream
string
algorithm
None of these
Q.14.
What are the mandatory part to present in function pointers?
&
retrun values
data types
none of these
Q.15.
To which type of class, We can apply RTTI?
Encapsulation
Polymorphic
Derived
None of these
Q.16.
Values that are used to end loops are referred to as _____ values.
stop
sentinel
end
finish
Q.17.
A special member function of a class, which is invoked automatically whenever an object goes out of the scope is called
Constructor
Destructor
Friend function
None of the above
Q.18.
What will happen when an exception is not processed?
It will eat up lot of memory and program size
Terminate the program
Crash the compiler
None of the mentioned
Q.19.
What is mandatory for designing a new container?
Classes
Iterators
Container
None of these
Q.20.
What is meant by exception specification?
A function is limited to throwing only a specified list of exceptions.
A catch can catch all types of exceptions.
A function can throw any type of exceptions.
none of the mentioned
Support mcqgeeks.com by disabling your adblocker.
Please disable the adBlock and continue. Thank you.