Solved

Given the Following Class and Array Declaration, How Would You

Question 53

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