In C++, declaration can appear almost anywhere in the body of the function.

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 In C++, declaration can appear almost anywhere in the body of the function.
2.2 A C++ function can return multiple values to the calling function.
2.3 Defining a class also creates objects.
2.4 Members of a class specified as private are accessible only to the functions of the class.
2.5 Destructors should be defined by class name or constructor name.
2.6 If a unary operator ++ is overloaded, it makes no difference if it is used as pre or post increment with an object.
2.7 A member function in a base class can be accessed by an object of its derived class.
2.8 Pointers to an int and float are same.
2.9 All functions in an abstract base class must be declared pure virtual.
2.10 Exception means out of the ordinary or deviating from the normal course.

Redirection redirects

1.10Redirection redirects
A) A stream from a file to the screen
B) A file from a device to a stream
C) The screen from a device to a stream
D) A device from the screen to a file

A static function

1.9 A static function
A) should be called when an object is destroyed
B) can be called using class name and function name
C) can be called using object and function name
D) is used when a dummy object is created

Consider the following code definition:

1.8 Consider the following code definition:
Class Person
{
};
Class Student: protected Person
{
};
What will happen when one tries to compile this class?
A) Will not compile, because 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.

The keyword friend can appear in

1.3 The keyword friend can appear in
A) The class allowing access to another classes
B) The class desiring access to another classes
C) It does not matter where you put the keyword
D) The scope of the class

The function’s most important role is to

1.2 The function’s most important role is to
A) Give a name to a block
B) Reduce program size
C) Accept arguments and provide a return value
D) Organize a program into conceptual units.