********QUESTION 7 IS INCLUDED FOR REFERENCE ONLY. I AM LOOKIN FOR THE ANWSER TO
ID: 3845462 • Letter: #
Question
********QUESTION 7 IS INCLUDED FOR REFERENCE ONLY. I AM LOOKIN FOR THE ANWSER TO QUESTION 8******
7. Consider the following statements: name Type. string first strin last struct empInfoType int department double salary string startDate address r in struct employee Type ameT name inte evaluation Score InfoT emp Info employeerype employee Department [100] employee Type my emp Inf Info ame name Mark the following statements as valid or invalid. lf a statement is invalid, explain why. a empl em nf de 2; b Cin employee name c. my De artmen [0] name d. my De [1] evaluation Score 8; e name myDe artment 10 name f employee name name g seut my artment C10 endl for j 100 antExplanation / Answer
struct nameType
{
string first;
string last;
};
struct empInforType
{
int department;
double salary;
string startDate;
string address;
};
struct employeeType
{
nameType name;
int evaluationScore;
empInforType empInfo;
};
employeeType employee;
// solution 8
strcpy(employee.name.first, "Gal");
strcpy(employee.name.last, "Gadot");
employee.evaluationScore = 10;
empInfo.department = 3;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.