若有以下程序段: 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
第1题
若有以下程序段: 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
第2题
有以下程序段: 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
第3题
有以下程序段: 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
第4题
若有以下定义和语句 struct a { int n,m;}; struct a st[3]={{1,20},{2,19},{3,21}}; struct a*p=st; 则以下错误的引用是
A.(p++)->n;
B.st[0].n;
C.(*p).n;
D.p=&st.m;
第5题
设有以下程序: struct st{int n;struct st*next;}; static struct st a[3]={5,&a[1],7,&a[2],9,'\0\},*p; p=&a[0];下面其值为6的表达式为______。
A.p++->n
B.p->n++
C.(*p).n++
D.++p->n
第6题
4.阅读程序,写出程序的运行结果。 void main() { struct st { int n: struct st *next; } a[3]={5,&a[1],7,&a[2],9,&a[0]}, *p=a; int i; for(i=0; i<3; i++) p="p-">next; printf(″p->n=%d\n″, p->n); } 程序的运行结果: ①
第7题
A.(p++)->n;
B.st[0].n;
C.(*p).n;
D.P=&st.m,
第8题
设有以下语句
struct st
{
int n;
struct st *next;
};
static struct st a[3]={5,&a[1],7,&a[2],9,'\0'},*p;
p=&a[0];
则以下表达式的值为6的是( )。
A.p++->n B.p->n++ C.(*p).n++ D.++p->n
第9题
有下列程序段: 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
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!