多选题:有如下定义,以下对职工的信息做相关处理的语句不正确的是:
有如下定义,以下对职工的信息做相关处理的语句不正确的是:
struct date
{
int year;
int month;
};
struct empInfo
{
char id[10];
char name[4];
struct date timeofenter;
double salary;
};
struct empInfo compa[40];
struct empInfo *pe=compa;
int i = 4;
A.
pe+i.salary = 10000;
B.
gets(compa[i].name);
C.
pe->timeofenter->year=2022;
D.
*(compa+i).id="20220001";
E.
scanf("%d",pe+i->timeofenter.month);
答案:C A D E
struct date
{
int year;
int month;
};
struct empInfo
{
char id[10];
char name[4];
struct date timeofenter;
double salary;
};
struct empInfo compa[40];
struct empInfo *pe=compa;
int i = 4;
A.
pe+i.salary = 10000;
B.
gets(compa[i].name);
C.
pe->timeofenter->year=2022;
D.
*(compa+i).id="20220001";
E.
scanf("%d",pe+i->timeofenter.month);
答案:C A D E