有下列语句:  struct Birthday{public int year;  public int month;   public int day;}; struct Student{ int no;  string name;   int age;  public Birthday bir; };  ……  Student Stu;  如果要把Stu的出生年份赋值为1988,正确的语句是()A、 Stu.bir.year=1988;B、 Stu.year=1988;C、 Stu. Birthday.year=1988;D、 Student. Birthday.year=1988;

有下列语句:  struct Birthday{public int year;  public int month;   public int day;}; struct Student{ int no;  string name;   int age;  public Birthday bir; };  ……  Student Stu;  如果要把Stu的出生年份赋值为1988,正确的语句是()

  • A、 Stu.bir.year=1988;
  • B、 Stu.year=1988;
  • C、 Stu. Birthday.year=1988;
  • D、 Student. Birthday.year=1988;

相关考题:

有以下程序段typedef struct node { int data; struct node *next; } *NODE;NODE p;以下叙述正确的是A)p 是指向 struct node 结构变量的指针的指针B)NODE p ;语句出错C)p 是指向 struct node 结构变量的指针D)p 是 struct node 结构变量

( 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;

有以下程序段 typedef struct node { int data; struct node *next; } *NODE; NODE p; 以下叙述正确的是( )。A.p是指向struct node结构变量的指针的指针B.NODE p;语句出错C.p是指向struct node结构变量的指针D.p是struct node结构变量

下面结构体的定义语句中,错误的是A)struct ord {int x;int y;int z;}; struct ord a;B)struct ord {int x;int y;int z;} struct ord a;C)struct ord {int x;int y;int z;} a;D)struct {int x;int y;int z;} a;

下列关于结构型、共用型、枚举型的定义语句中,正确的是( )。A.struct ss{int x}B.union uu{int x;}xx=5;C.enum ee{int x};D.struct{int x;};

下列语句段中,正确的是( )。A.struct{int x;float y;int a[2];unsigned b[3];char name[10];};B.struct stu{unsigned a[3];unsigned b[4];}x;int*p=x.a;C.struct stu{int a;float x[4];}y={1,1.0};float data=y.x;D.struct nd{int a,b;unsigned c[2]=5;};

有以下说明和定义语句 struct student { int age;char num[8]; struct student stu[3]={{20,"200401"},{21,"200402"},{19,"200403"}}; struct student *p=stu;}; 以下选项中引用结构体变量成员的表达式错误的是A.(p++)->numB.p->numC.(*p).numD.stu[3].age

若有下列说明和语句,已知int型数据占2个字节,则下列语句的输出结果是( )。stmct st{ char a[15];int b;double c;};printf("%d",sizeof(struct st));A.15B.8C.25D.2

下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int y;int z;};struct ord a;B.struct ord{int x;int y;int z;};ord a;C.struct ord{int x;int y;int z;}a;D.struct{int x;int y;int z;}a;

下面结构体的定义语句中,错误的是( )。 A.struct ord{int x;int Y;int Z;};struet ord a;SXB 下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int Y;int Z;};struet ord a;B.struct ord{int x;int y;int Z;}struct ord a;C.struct ord{int X;int Y;int Z;}a;D.struct{int X;int y;int Z;}a;

设有下列定义: struct sk { int m; float x; )dara,*q; 若要使q指向data中的m域,正确的赋值语句是( )。A.q=data.m;B.*q=data.m;C.q=(struct sk*)data.m;D.q=(struct sk*)data.m;

有以下定义和语句: 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 try { int one; float two; }*str;若要动态开辟一个结构单元,使指针str指向其首地址,正确的语句是______。A.str=(try*)malloc(sizeof(try));B.*str=(struct try*)malloc(sizeof(struct try));C.str=(strucy try*)malloc(sizeof(struct try));D.str=(struc try)malloc(sizeof(struct try));

若定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 struct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。Struct st{ int x;inty;int z;}Struct worker{ char name[20];char sex;struct st birth;}p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

若有下列说明和语句,已知int型数据占2个字节,则下列语句的输出结果是( )。 struct st { char a[15]; int b; double c; }; printf("%d",sizeof (struct st));A.15B.8C.25D.2

设有以下说明语句 typedef struct { int n; char ch[8]; }PER;A.PER 是结构体变量名B.PER 是结构体类型名C.typedef struct 是结构体类型D.struct 是结构本类型名

设有以下说明和定义:typedef union{ long i;int k[5];char c; } DATE;struct date{ int cat;DATE cow;double dog; }too;DATE max;则下列语句的执行结果是______。printf("%d",sizeof (struct date) +sizeof(max));A.26B.30C.18D.8

有以下说明和定义语句struct student{ int age; char num[8];};struct student stu[3]={{20,"200401"},{21,"200402"},{10\9,"200403"}};struct student *p=stu;以下选项中引用结构体变量成员的表达式错误的是A.(p++)-num B.p-num C.(*p).num D.stu[3].age

下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int Y;int z;}struct ord a;B.struct ord{int x;im Y;im z;};struct ord a;C.struct ord{int x;int Y;int Z;}a;D.struct{int x;int Y;int z;}a;

下列语句段中,正确的是( )。A.struct { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p= x.a;C.street stu { int a; float x[4]; }y={1,1.0}; float data=y.x;D.struct nd {int a,b; unsigned c[2]=5; };

假定有“struct BOOK{char title[40]; float price;}; struct BOOK book;”,则不正确的语句为()。Astruct BOOK *x=malloc(book);Bstruct BOOK x={"C++ Programming",27.0};Cstruct BOOK *x=malloc(sizeof(struct BOOK));Dstruct BOOK *x=book;

有以下说明语句:struct Worker{int no;char name[20];};Worker w,*p=w;则下列错误的引用是()A、w.noB、p-noC、(*p).noD、*p.no

设有C语句:struct T{int n;double x;}d,*p;,若要使p指向结构体变量中的成员n,正确的赋值语句是()A、p=d.nB、*p=d.nC、p=(struct T *)d.nD、p=(struct T *)d.n

单选题假定有“struct BOOK{char title[40]; float price;}; struct BOOK book;”,则不正确的语句为()。Astruct BOOK *x=malloc(book);Bstruct BOOK x={C++ Programming,27.0};Cstruct BOOK *x=malloc(sizeof(struct BOOK));Dstruct BOOK *x=book;

单选题设有C语句:struct T{int n;double x;}d,*p;,若要使p指向结构体变量中的成员n,正确的赋值语句是()Ap=d.nB*p=d.nCp=(struct T *)d.nDp=(struct T *)d.n

单选题有以下说明语句:struct Worker{int no;char name[20];};Worker w,*p=w;则下列错误的引用是()Aw.noBp-noC(*p).noD*p.no