Multiple Choice
Given the following class definition and the following member function header, which is the correct way to output the private data?
Class Person
{
Public:
Void outputPersonostream& out) ;
Private:
Int age;
Float weight;
Int id;
};
Void Person::outputPersonostream& out)
{
//what goes here?
}
A) out << person.age << person.weight << person.id;
B) out << person;
C) out << age << weight << id;
D) outputPersonperson) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q45: When several items variables or variables and
Q46: When a structure contains another structure variable
Q47: All constructors for a class must be
Q48: A structure can only be passed to
Q49: The assignment operator may not be used
Q51: If class A is derived from class
Q52: A structure variable is a collection of
Q53: Given the following strucure definitions, what is
Q54: Given the following class, what would be
Q55: It is possible to have multiple private