struct DateTag{ int nMonth; int nDay; int nYear; }; struct NameTag{ char strFirst[ 31 ]; char strLast[ 21 ]; }; struct E

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

struct DateTag{ int nMonth; int nDay; int nYear; }; struct NameTag{ char strFirst[ 31 ]; char strLast[ 21 ]; }; struct E

Post by answerhappygod »

struct DateTag{
int nMonth;
int nDay;
int nYear;
};
struct NameTag{
char strFirst[ 31 ];
char strLast[ 21 ];
};
struct EmployeeTag{
int nId;
struct NameTag sName;
struct DateTag sBirth;
};
struct DepartmentTag{
char strName[ 21 ];
char strDescription[ 51 ];
struct EmployeeTag sManager;
struct EmployeeTag arrEmployees[ 15 ];
};
struct CompanyTag{
char strName[ 31 ];
struct DepartmentTag arrDepartments[ 10];
};
struct CompanyTag c1, c2;
struct DepartmentTag d1, d2;
struct EmployeeTag e1, e2;
struct EmployeeTag *pEmp;
1. Which statement(s) is/are syntacticallycorrect?
a) e1 = d1.sManager;
b) e1 = d1.arrEmployees;
2. Which statement(s) is/are syntacticallycorrect?
a) d1.arrEmployees[ 0 ] = pEmp;
b) pEmp = d1.arrEmployees;
3. Which statement(s) is/are syntactically correct?
a) c1.d1 = d2;
b) c2.arrDepartments[1] = d2;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply