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;
struct DateTag{ int nMonth; int nDay; int nYear; }; struct NameTag{ char strFirst[ 31 ]; char strLast[ 21 ]; }; struct E
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am