A、wasn't it
B、was it
C、isn't it
D、is it
第1题:
已知学生记录描述为:
struct student
{ int no;
char name[20],sex;
struct
{ int year,month,day;
} birth;
};
struct student s;
设变量s中的"生日"是"1984年11月12日",对"birth"正确赋值的程序段是
A.year=1984;month=11;day=12;
B.s.year=1984;s.month=11;s.day=12;
C.birth.year=1984;birth.month=11;birth.day=12;
D.s.birth.year=1984;s.birth.month=11;s.birth.day=12;
第2题:
有以下定义和语句
Struct Workers
{ int num;char name[20];char c;
struct
{ int day;int month;int year;}s;
};
Struct Workers W,*pe;
PW=&W;
能给W中yeaR成员赋1980的语句是
A.*pW.yeaR=1980;
B.W.yeaR=1980;
C.pW->yeaR=1980;
D.W.s.yeaR=1980;
第3题:
( 38 )有以下定义和语句
struct workers
{ int num;char name[20];char c;
struct
{ int day; int month; int year; } s;
} ;
struct workers w,*pw;
pw = &w;
能给 w 中 year 成员赋 1980 的语句是
A ) *pw.year = 198O;
B ) w.year=1980;
C ) pw->year=1980;
D ) w.s.year=1980;
第4题:
判断闰年的函数,把下列语句补充完整。 leap.year <- function (year) { ifelse (, TRUE, FALSE) }
A.(year %% 4 == 0 & year %% 100 != 0)
B.(year %% 4 == 0 & year %% 100 != 0) || year %% 400 == 0
C.(year %% 4 == 0 || year %% 100 != 0)
D.(year/4 == 0 & year/100 != 0) || year/400 == 0
第5题:
已知学生记录描述如下,设变量s中的“生日”应是“1984年11月11日”,下列对生日的正确赋值方式是()。 struct student{ int no; char name[20]; char set; struct{ int year; int month; int day; } birth; }; struct student s;
A.year=1984;month=11;day=11;
B.birth.year=1984; birth.month=11; birth.day=11
C.s.year=1984;s.month=11;s.day=11
D.s.birth.year=1984;s.birth.month=11; s.birth.day=11;
第6题:
已知学生记录描述为: struct student { int no; char name[20],sex; struct { int year,month,day; } birth; }; struct student s; 设变量s中的“生日”是“1984年11月12日”,对“birth”正确赋值的程序段是( )。
A.year=1984;month=11;day=12;
B.s.year=1984;s.month=11;s.day=12;
C.birth.year=1984;birth.month=11;birth.day=12;
D.s.birth.year=1984;s.birth.month=11;s.birth.day=12;
第7题:
有以下定义和语句: struct workers {int num;char name[20];char C; struct {int day;int month;int year;)S; }; struct workers w,*pw; pw=&w; 能给w中year成员赋1980的语句是( )。
A.*pw.year=1980;
B.w.year=1980;
C.pw->year=1980
D.w.S.year=1980;
第8题:
已知学生记录描述为 struct student { int no; char name[20]; char sex; struct { int year; int month; int day; } birth; }; struct student s;变量s中的“生日”应是“1985年4月4日”,下列对“生日”的正确赋值方式是______。
A.year=1985;month=4;day=4;
B.birth.year=1985;birth.month=4;birth.day=4;
C.s.year=1985;s.month=4;s.day=4;
D.s.birth.year=1985;s.birth.month=4;s.birth,day=4;
第9题:
1、判断是否闰年的表达式(如果是闰年则值为1,否则为0)为()
A.((year%4==0)&&(year%100!=0))||(year%400==0)
B.((year%4==0)&&((year%100!=0)||(year%400!=0)))
C.((year%4==0)||(year%100!=0)&&(year%400==0))
D.(year%4==0)||((year%100==0)&&(year%400!=0))
第10题:
使用变量year代表年份,以下表示判断year是否为闰年的布尔表达式是 。
A.(year % 4 == 0) and (not(year % 100 == 0)) or (year % 400 == 0)
B.(year % 4 == 0) and (not(year % 400 == 0)) or (year % 100 == 0)
C.(year % 4 == 0) and (year % 100 == 0) or (year % 400 == 0)
D.(year % 4 == 0) or (not(year % 100 == 0)) and (year % 400 == 0)