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