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;
[单选题]( 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;
[单选题]( 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;
[单选题]( 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;
[单选题]有以下定义和语句: struct students {int num;char name[20];char c; struct {int grade1;int grade2;}s; }; struct students w,*pw; *pw=w; 下列赋值语句不正确的是( )。A.w.num=1002;B.w.grade1=85;C.pw->num=1002;D.w.s.grade2=85;
[单选题]若有以下定义的语句 struct student {int age; int num;}; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; main() {stmct student *p; p=stu; …} 则以下不正确的引用是A.(p++)->numB.p++C.(*p).numD.P=&stu.age.
[单选题]有如下定义: struct person {char name[9];int age;}; struct person class[10]={"John",17,"paul",19,"Mary",18,"Adam",16}; 根据上述定义,能输出字母M的语句是( )。A.printf("%c/n",class[3].name);B.printf("%c/n",class[3].name[1]);C.printf("%c/n",class[2].name[1]);D.p
[单选题]有如下定义struct person {char name[9];int age;};struct person class[10]={"John",17,"paul",19,"Mary",18,"Adam",16,};根据上述定义,能输出字母M的语句是A.printf("%c/n",class[3].name);B.printf("%c/n",class[3].name[1]);C.printf("%c/n",class[2].name[1]);D.printf(
[单选题]设有如下定义 struct ss { char name[10]; int age; char sex; } std[3],* p=std; 下面各输入语句中错误的是A.scanf("%d",&(*p).age);B.scanf("%s",&std.name);C.scanf("%c",&std[0].sex);D.scanf("%c",&(p->sex));
[单选题]设有如下定义 struct ss { char name [10]; int age; char sex; }std[3],*p=std; 下列各输入语句中错误的是_______。A.scanf("%d",&(*p).age);B.scanf("%s",&std.name);C.scanf("%c",&std[0].sex);D.scanf("%c",&(p->sex));
[单选题]设有如下定义 struct ss { char name[10]; int age; char sex; }std[3], * p=std; 下面各输入语句中错误的是A.cin>>(* p).age);B.cin>>std.name);C.cin>>std[0].sex);D.cin>>(p->.sex));