Consider the following statements:
struct nameType
{
string first;
string last;
};
struct dateType
{
int month;
int day;
int year;
};
struct personalInfoType
{
nameType name;
int pID;
dateType dob;
};
Mark the following statements as valid or invalid. If a statement is
invalid, explain why:
person.name.first = “William”;
cout << person.name << endl;
classList [1] = person;
classList [20].pID = 000011100;
person = classList [20];
student = person.name;
cin >> student;
for (int j = 0; j < 100; j++)
classList [j].pID = 0000000;
classList.dob.day = 1;
student = name;
