Exam 15: Inheritance
Exam 1: Introduction to Computer and C Programming55 Questions
Exam 2: C++ Basics54 Questions
Exam 3: More Flow of Control44 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value51 Questions
Exam 5: Functions for All Sub Tasks53 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes51 Questions
Exam 7: Arrays34 Questions
Exam 8: Strings and Vectors63 Questions
Exam 9: Pointers and Dynamic Arrays40 Questions
Exam 10: Defining Classes50 Questions
Exam 11: Friends, overloaded Operators, and Arrays in Classes49 Questions
Exam 12: Separate Compilation and Namespaces38 Questions
Exam 13: Pointers and Linked Lists51 Questions
Exam 14: Recursion43 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates33 Questions
Exam 18: Standard Template Library57 Questions
Select questions type
If a base class has a virtual function named print,and a pointer variable of that class is pointing to a derived object,then the code ptr->print ); calls
(Multiple Choice)
4.9/5
(34)
If a derived class Class2)has redefined a function from the base class Class 1),how can that derived function call the base class function if the function declaration is as follows?
Void print );
(Multiple Choice)
4.9/5
(32)
The derived class may define variables and member functions other than those that are in the base class.
(True/False)
4.8/5
(38)
Given a class A that derives from a class B that derives from a class C,when an object of class A goes out of scope,in which order are the destructors called?
(Multiple Choice)
4.9/5
(31)
If a base class has a non-virtual member function named print,and a pointer variable of that class is pointing to a derived object,then the code ptr->print ); calls
(Multiple Choice)
4.9/5
(37)
If a base class has public member functions that are not listed by a derived class,then these functions
(Multiple Choice)
4.8/5
(39)
Which of the following would correctly call the base class BaseClass)assignment operator from the derived class DerivedClass)assignment operator?
DerivedClass& DerivedClass::operator =const DerivedClass& rightSide)
{
//what goes here?
}
(Multiple Choice)
4.8/5
(40)
If two functions in the same scope)have the same name,but a different function signature,this means that the functions are __________.
(Short Answer)
4.9/5
(47)
Which is the correct way to tell the compiler that the class being declared ChildClass)is derived from the base class BaseClass)?
(Multiple Choice)
4.9/5
(36)
Given the following simplified classes,
Class Pet
{
Public:
Virtual void print);
String name;
Private:
};
Class Dog: public Pet
{
Public:
Void print);
String breed;
};
Dog vDog;
Pet vPet;
VDog.name="rover";
VDog.breed = "Collie";
Which of the following statements are not legal?
(Multiple Choice)
4.8/5
(41)
Showing 41 - 53 of 53
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)