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:

Verified
Correct Answer:
Verified
Q46: Both the copy constructor and the assignment
Q47: Functions that are constant member functions may
Q48: Which of the following are not correct?<br>A)
Q49: What is wrong with the following overloaded
Q50: Operators can be overloaded as<br>A) friends of
Q51: To overload functions with symbolic names like
Q52: Given the following class, what is syntactically
Q54: Putting the keyword const in front of
Q55: When a dynamic array with a class
Q56: Why should you generally pass an object