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 setAge(int newAge);
void setGender( char newGender);
void setSalary(float 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();
d. cout << people[9].getAge();
You might also like to view...
Any file that can self-replicate is a ________
a. Virus b. Worm c. Trojan horse d. None of the above
A mashup is a combination of media, regardless of whether it is protected by copyright.
Answer the following statement true (T) or false (F)
You can add the results of a query to an existing table by using a(n) _________ query
Fill in the blank(s) with correct word
____ layouts use ems instead of pixels as the unit for div and text styles.
A. Liquid B. Elastic C. Fixed-width D. Indexed