有下列语句: 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,正确的语句是()
第1题:
有以下程序段 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结构变量
第2题:
下列关于结构型、共用型、枚举型的定义语句中,正确的是( )。A.struct ss{int x}B.union uu{int x;}xx=5;C.enum ee{int x};D.struct{int x;};
第3题:
有以下程序段
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 结构变量
第4题:
下面结构体的定义语句中,错误的是( )。
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;
第5题:
有以下说明和定义语句 struct student { int age;char num[8]; struct student stu[3]={{20,"200401"},{21,"200402"},{19,"200403"}}; struct student *p=stu;}; 以下选项中引用结构体变量成员的表达式错误的是
A.(p++)->num
B.p->num
C.(*p).num
D.stu[3].age
第6题:
下面结构体的定义语句中,错误的是
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;
第7题:
下列语句段中,正确的是( )。
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;};
第8题:
( 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;
第9题:
若有下列说明和语句,已知int型数据占2个字节,则下列语句的输出结果是( )。
stmct st
{ char a[15];
int b;
double c;
};
printf("%d",sizeof(struct st));
A.15
B.8
C.25
D.2
第10题:
下面结构体的定义语句中,错误的是( )。
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;