Solved

Given the Following Class and Array Declaration, How Would You

Question 52

Multiple Choice

Given the following class and array declaration, how would you print out the age of the 10th person in the array?
Class personClass
{
Public:
Void setAgeint newAge) ;
Void setGender char newGender) ;
Void setSalaryfloat newSalary) ;
Int getAge) ;
Char getGender) ;
Float getSalary) ;
Private:
Int age;
Char gender;
Float salary;
};
PersonClass people[100];


A) cout << people[10];
B) cout << people[9];
C) cout << people[9].age;
D) cout << people[9].getAge) ;

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