设有一结构体类型变量定义如下:structdate{intyear;intmonth;intday;};structworklist{charname[20];charsex;structdatebirthday;}person;若对结构体变量person的出生年份进行赋值时,下面正确的赋值语句是()
A: year=2005
B: birthday.year=2005
C: person.birthday.year=2005
D: person.year=2005
A: year=2005
B: birthday.year=2005
C: person.birthday.year=2005
D: person.year=2005
举一反三
- 设有如下定义:struct date{intyear;intmonth;intday;};struct worklist{charname[20];charsex:struct date birthday;}person;若要对结构体变量person的出生年份进行赋值时,下面正确的赋值语句是()。 A: year=2001 B: birthday.year=2001 C: person.birthday.year=2001 D: person.year=2001
- 设有一结构体类型变量定义如下:struct date{ int year; int month; int day;};struct worklist{ char name[20]; char sex; struct date birthday;}person;若对结构体变量person的出生年份进行赋值时,下面正确的赋值语句是________ A: year=1976 B: birthday.year=1976 C: person.birthday.year=1976 D: person.year=1976
- 9、设有一结构体类型变量定义如下:struct date{ int year; int month; int day;};struct worklist{ char name[20]; char sex; struct date birthday;};struct worklist person;若对结构体变量person的出生年份进行赋值时,下面正确的赋值语句是 A: year=1976 B: birthday.year=1976 C: person.birthday.year=1976 D: person.year=1976
- 设有一结构体类型变量定义如下:struct date{ int year; int month; int day;};struct worklist{ char name[20]; char sex; struct date birthday;}person;若对结构体变量person的出生年份进行赋值时,下面正确的赋值语句是________ A: year=1976 B: birthday.year=1976 C: person.birthday.year=1976 D: person.year=1976
- 设有一结构体类型变量定义如下:structdate{intyear;intmonth;intday;};structworker{charname[20];charsex;structdatebirthday;}w1;若对结构体变量w1的出生年份进行赋值,下面正确的赋值语句是()