A constructor’s name is same as

A. class name B. object C. new
D. brackets E. comment F. zero
G. iostream H. inheritance I. multilevel
J. static K. public L. virtual
M. protected N. istream O. catch

4.1 ___________ is used to document a program.
4.2 A constructor’s name is same as _______________.
4.3 A(n) ________ function causes its class to be abstract.
4.4 A pointer to _________ can hold pointers to any data type.
4.5 _________ are used to change the order of precedence in evaluation of expression.
4.6 The process by which objects of one class acquire the attributes of objects of another
class is known as __________.
4.7 The class _____________ declares input function such as get( ) and read( ).
4.8 The___________ operator dynamically allocates memory for the object of a specific
type.
4.9 A virtual function can be made pure virtual function by placing__________ at the end of
its prototype in the class definition.
4.10 Exceptions are thrown from a try statement to a(n) __________ block.

A ‘Do’ loop is executed at least once.

Each statement below is either TRUE or FALSE. Choose the most appropriate one
and ENTER in the “tear-off” sheet attached to the question paper, following
instructions therein.

2.1 A ‘Do’ loop is executed at least once.
2.2 Objects of the string class can be copied with the assignment operator.
2.3 Inheritance is used to improve data hiding and encapsulation.
2.4 An abstract class is never used as a base class.
2.5 A file pointer always contains the address of the file.
2.6 Template creates different versions of a function at run time.
2.7 Throwing an exception always causes program termination.
2.8 Derived classes of an abstract class that do not provide an implementation of a pure
virtual function are also abstract.
2.9 A function template can have more than one template argument.
2.10 The function that has return type void does not return anything.

An exception is caused by

1.10An exception is caused by
A) A hardware problem
B) A problem in the operating system
C) A run-time error
D) A syntax error

We can make a class abstract by

1.9 We can make a class abstract by
A) Declaring it abstract using the static keyword
B) Declaring it abstract using the virtual keyword
C) Making all member functions constant
D) Making at least one member function as pure virtual function

Consider the following code definition

1.8 Consider the following code definition:
class Person
{}
;
class Student: protected Person
{}
;
What happens when we try to compile this class?
A) Will not compile class body of Person is not defined
B) Will not compile because of Student is not defined
C) Will compile successfully
D) Will not compile because class Person is not public inherited.

Consider the following code:

1.4 Consider the following code:
if(number>0)
cout<<”Number is Positive”;
else
cout<<”Number is Negative”;
What will be the output if number is equal to zero?
A) Number is Positive
B) Number is Negative
C) Both A) & B)
D) None of the above

Inheritance is a way to

1.3 Inheritance is a way to
A) Create general classes from more specific classes
B) Create specific classes from more general classes
C) Improve data hiding and encapsulation
D) None of the above