数据结构里,有名为goods的结构体,定义这种结构体的指针变量正确的是()。
第1题:
已知函数的原形如下,其中结构体a为已经定义过的结构,且有下列变量定义
struct a *f(int t1,int *t2,strcut a t3,struct a *t4)
struct a p,*p1;int i;
则正确的函数调用语句为
A.&p=f(10,&i,p,p1);
B.p1=f(i++,(int *)p1,p,&p);
C.p=f(i+1,&(i+2),*p,p);
D.f(i+1,&i,p,p);
第2题:
已知有结构体: struct sk { int a; float b; }data,*p; 若有p=&data,则对data的成员a的正确引用是( )。
A.struct是结构体类型的关键字
B.st是结构体类型名
C.x、y、z都是结构体成员名
D.struct str是结构体类型名
第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题:
若定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 struct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;
A.x=1987
B.birth.x=1987;
C.p.birth.x=1987;
D.p.x=1987;
第5题:
设有定义:
struct person
{int ID;char name[12];}P;
请将scanf(“%d”, 【 】);语句补充完整,使其能够为结构体变量P的成员ID正确读人数据。
第6题:
有以下说明和定义语句 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
第7题:
有以下结构体说明和变量的定义,且指针p指向变量a,指针q指向变量b。则不能把节点b连接到节点a 之后的语句是
struct node
{ char data;
struct node*next;
}a,b,*p= &a,*q=&b;
A.a. next=q;
B.p. next= &b;
C.p->next=&b;
D.(*p).next=q;
第8题:
有以下程序段 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结构变量
第9题:
有以下结构体说明和变量的定义,且指针p指向变量a,指针q指向变量b。则不能把节点b连接到节点a之后的语句是
struct node
{ char data;
stmct node * next;
} a,b, * p=&a, * q=&b;
A.a. next=q;
B.p. next=&b;
C.p->next=&b;
D.( * p) .next=q;
第10题:
设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。
Struct st
{ int x;
inty;
int z;
}
Struct worker
{ char name[20];
char sex;
struct st birth;
}p;
A.x=1987
B.birth.x=1987;
C.p.birth.x=1987;
D.p.x=1987;