Futuresoft Previous Years Solved Sample Placement Papers
-
Classes are useful because they
A: are removed from memory when not in use
B: permit data to be hidden from other classes
C: bring together all aspects of an entity in one place
D: can closely model objects in the real world
Ans: B -
The public files in a class library usually contain?
A: Constant definitions
B: Member function definitions
C: Class declarations
D: Variable definitions
Ans: C -
Class cannot be?
A: Virtual
B: Generic
C: Inline
D: Friend
Ans: C -
Objects of the same class share the values of ...... while they maintain separate values for ........ .
A: Static variables, non-static variables
B: Non-static variables, static variables
C: Global variables, static variables
D: Static variables, register variables
Ans: A -
Which of the following keywords cannot appear inside a class definition?
A: friend
B: static
C: template
D: virtual
Ans: C -
Which of the following is false with respect to inheritance?
A: When a base class is privately inherited, public members of the base class become private members of the derived class
B: When a base class is publicly inherited, public members of the base class become public members of the derived class
C: When a base class is privately inherited, a private member of the base class becomes a private member of the derived class
D: When a base class is publicly inherited, protected members of the base class become protected members of the derived class
Ans: C -
Which of the following is/are false?
A: Inheritance is deriving a new class from an existing class
B: In inheritance, all data and function members of the base class are derived by the derived class
C: We can specify which data and function members of the base class will be inherited by the derived class
D: We can add new functions to the derived class without recompiling the base class
Ans: B -
A base class will offer
A: More specific objects than its derived classes
B: Correspond to something in the real world
C: Behave badly when the chips are down
D: Be a generalized version of its derived classes
Ans: D -
If a base class member access is public, and an inherited class accesses specifier is private, which of the following statement is true?
A: The base class member can be accessed by derived class objects
B: The base class members cannot be accessed by the derived class members
C: The derived class members can be accessed by the base class objects
D: None of the above
Ans: A -
Choose the most appropriate statement
A: An abstract base class can have a pure virtual destructor
B: An abstract base class can have only a virtual destructor
C: An abstract base class can have a non-virtual destructor
D: An abstract base class cannot have a destructor
Ans: D