有下列程序段:
struct st
{int x;int*y;}*pt;
int a[]={1,2},b[]={3,4};
stmct st c[2]={10,a,20,b};
pt=c;
下列选项中表达式的值为11的是( )。
A.*pt->y
B.pt->x
C.++pt->x
D.(pt++)->X
第1题:
有下列程序段: 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
第2题:
下列程序段的输出结果是 #include<iostream.h> void fun(int*x,int*y) {cout<<*x<<*y; *X=3; *y=4; } void main() {int x=1,y=2; fun(&y,&x); cout<<X<<y<<endl; }
A.2143
B.1212
C.1234
D.2112
第3题:
下列程序段的输出结果是 #include<iostream.h> void fun(int * X,int * y) { cout < < * X < < * y; * X=3; * y=4; } void main( ) { int x=1,y=2; fun(&y,&x); cout < < X < < y < < end1; }
A.2143
B.1212
C.1234
D.2112
第4题:
有以下程序段 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
第5题:
有下列程序段: 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