Chapter 11: Problem 6
Consider the following statements: struct nameType struct dateType struct personalInfoType { { { string first; int month; nameType name; string last; int day; int pID; }; int year; dateType dob; }; }; personalInfoType person; personalInfoType classList[100]; nameType student; Mark the following statements as valid or invalid. If a statement is invalid, explain why. a. person.name.first = "William"; b. cout << person.name << endl; c. classList[1] = person; d. classList[20].pID = 000011100; e. person = classList[20]; f. student = person.name; g. cin >> student; h. for (int j = 0; j < 100; j++) classList[j].pID = 00000000; i. classList.dob.day = 1; j. student = name;
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.