1) A try block can be nested under another try block. a. True b. False
|
||||
2) In nested try blocks, there is no need to specify catch handler for inner try block. Outer catch handler is sufficient for the program. a. True b. False
|
||||
3) We can prevent a function from throwing any exceptions. a. True b. False
|
||||
4) Functions called from within a try block may also throw exception. a. True b. False
|
||||
5) The explicit keyword is an optional decoration for the constructors that takes exactly_____argument. a. No argument b. Two c. Three d. One
|
||||
6) A class can contain objects of other classes and this phenomenon is called_________ . a. Relationship b. Object Association c. Containership d. None of these
|
||||
7) Can we alter/modify the values of data members of a class inside const member function? a. Yes b. No
|
||||
8) If a class contains pure virtual function, then it is termed as____________________ . a. Virtual class b. Sealed class c. Pure Local class d. Abstract Class
|
||||
9) If inner catch handler is not able to handle the exception then__________ . a. Compiler will look for outer try handler b. Program terminates abnormally c. Compiler will check for appropriate catch handler of outer try block d. None of these
|
||||
10) Generic catch handler is represented by ______________ . a. catch(..,) b. catch(---) c. catch(…) d. catch( void x)
|
||||
11) Which one is suitable syntax for function template? a. template< class T> return_type Function_Name(parameters) b. template< typename T> return_type Function_Name(parameters) c. both a and b d. None of these
|
||||
12) It is not possible to combine two or more file opening mode in open () method. a. True b. False
|
||||
13) Private members of the class are not inheritable. a. True b. False
|
||||
14) While overloading binary operators using member function, it requires ___ argument/s. a. Zero b. One c. Two d. Three
|
||||
15) If abstract class is inherited by derived class, then_______________ . a. Derived class should provide definition for all the pure virtual functions b. Derived class also become abstract if fails to implement pure virtual functions c. Objects of derived class can’t be created if it fails to implement pure virtual functions d. All of these
|
||||
16) By default, all the files are opened in ___________mode . a. Binary b. Text c. Can’t say
|
||||
17) Generic catch handler must be placed at the end of all the catch handlers. a. True b. False
|
||||
18) An exception can be of only built-In type. a. True b. False
|
||||
19) The CPP compiler supports automatic type conversions for the user defined datatypes. a. True b. False
|
||||
20) Can a class be declared/defined inside another class ? a. Yes b. No
|
||||
21) Can we pass parameters to base class constructor though derived class or derived class constructor? a. Yes b. No
|
||||
22) _________________are used for generic programming. a. Inheritance b. Virtual Functions c. Templates d. None of these
|
||||
23) Irrespective of exception occurrence, catch handler will always get executed. a. True b. False
|
||||
24) In CPP, cin and cout are the predefined stream __________ . a. Operator b. Functions c. Objects d. Data types
|
||||
25) Object oriented programming employs_________ programming approach. a. top-down b. procedural c. bottom-up d. all of these.
|
||||
26) Constant variables can be created in CPP by using ________ . a. enum b. const c. #define d. All of these e. None of these
|
||||
27) A virtual function that has no definition within the base class is called____________. a. Pure virtual function b. Pure static function c. Pure Const function d. Friend function
|