Solved

Given the Following Class Definition and the Following Member Function

Question 34

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents