[单选题]

有以下定义和语句: 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 Workers{int num;char name

[单选题]有以下定义和语句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;ch

    [单选题]( 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;ch

    [单选题]( 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;ch

    [单选题]( 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 student{int age;int num;

    [单选题]若有以下定义的语句 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 a{ int n,m;}; struct a

    [单选题]若有以下定义和语句 struct a{ int n,m;}; struct a st[3]={{2,3},{4,5},{6,7}}; struct a*p=st;则以下错误的引用是A.(p++)->n; B.st[0].n; C.(*p).n; D.P=&st.m,

  • 查看答案
  • 若有以下定义的语句 struct student { int age; int

    [单选题]若有以下定义的语句struct student{ int age;int num; };struct student stu[3]={{1001,20},{1002,19},{1003,21}};main(){ struct student *p;p=stu;… }则以下不正确的引用是A.(p++)->numB.p++C.(*p).numD.P=&stu.age.

  • 查看答案
  • 若有以下定义的语句 struct student { int age; int

    [单选题]若有以下定义的语句struct student{ int age;int num; };struct student stu[3]={{1001,20},{1002,19},{1003,21}};main(){ struct student *p;p=stu;… }则以下不正确的引用是A.(p++)->numB.p++C.(*p).numD.P=&stu.age.

  • 查看答案
  • 若有定义和语句:struct student { int num; char n

    [主观题]若有定义和语句:struct student { int num; char name[10]; float score;} s[5]={{1,"lili",98.5},{9,"xiaohua",66}},*p=s;printf("%d",*p++);输出结果是1。( )此题为判断题(对,错)。

  • 查看答案
  • 有如下定义:struct person {char name[9];int ag

    [单选题]有如下定义: 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

  • 查看答案