设有以下程序: struct st{int n;struct st *next;}; static struct st a[3]={5,&a[1],7,&
A.p++->n
B.p->n++
C.(*p).n++
D.++p->n
A.p++->n
B.p->n++
C.(*p).n++
D.++p->n
有以下程序段: struct st { int x; int * y; } * pt; int a[] = {1,2} ,b[] = {3,4}; struct st c[2] = {10,a,20,b}; pt=c; 以下选项中表达式的值为11的是()。
A.*pt->y
B.pt->x
C.++pt->x
D.(pt++)->x
A.10,3
B.20,3
C.10,20
D.20,2
以下程序的输出是______。 struct st {int x;int*y; }*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[1],60,&dt[2],60,&dt[3]}; main() { p=aa; printf("%d\n",++(p->X)); }
A.51
B.11
C.50
D.60
若有以下程序段: struct st {int n; int*m;}; int a=2,b=3,c=5; struct st s[3]=({101,&a},{102,&c},{103,&b}}; main() {struct st*p; p=s; …} 则以下表达式中值为5的是()。
A.(p++)->m
B.*(p++)->m
C.(*p).m
D.*(p)->m
以下程序的输出结果是 #include<stdio.h> struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],}; main() { p=aa; printf("%d\n",++(p->x));}
A.10
B.11
C.51
D.60
A.10
B.11
C.51
D.60
设有以下程序段:
struct MP3
{ char name[20];
char color;
float price;
}std,*ptr;
ptr=&std:
若要引用结构体变量std中的color成员,写法错误的是()。
A.std.color
B.ptr->color
C.std->color
D.(*ptr)color
A.以上的说明形式非法
B.ST是一个结构体类型
C.NEW是一个结构体类型
D.NEW是一个结构体变量
设有如下定义: struct ss { char name[10] int age; char sex; } std[3],*p=std; 下面各输入语句中错误的是()。
A.scanf("%d",&(*p).age);
B.scanf("%st",&std.name);
C.scanf("%c",&std[0].sex);
D.scanf("%c",&(p->sex));