Examlex

Solved

Given the Following Classes and Code, What Is the Output

question 9

Multiple Choice

Given the following classes and code, what is the output of the last statement shown?
Class Pet
{
Public:
Virtual void print) ;
String name;
Private:
};
Class Dog: public Pet
{
Public:
Void print) ;
String breed;
};
Void Pet::print)
{
Cout << "My name is " << name;
}
Void Dog::print)
{
Pet::print) ;
Cout << ", and my breed is a "<< breed << endl;
}
Pet* pPtr;
Dog* dPtr=new Dog;
DPtr->name= "Rover";
DPtr->breed="Weiner";
PPtr= dPtr;
PPtr->print) ;


Definitions:

Phonemes

The smallest units of sound in a language that are capable of conveying a distinction in meaning, such as the difference between the p in "pat" and the b in "bat."

Symbolism

The use of symbols to represent ideas or qualities in literature, art, and other forms of cultural expression.

Generativity

The concern in establishing and guiding the next generation, often seen during middle adulthood.

Metalinguistics

The ability to reflect upon and analyze language as an abstract system.

Related Questions