更多"以下程序的输出是( )。 struct st { int x;"的相关试题:
[单项选择]设有以下程序: 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. (*.n++
D. ++p->n
[单项选择]以下程序的输出结果是 ( ) 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
[单项选择]有以下程序段:
typedef struct NODE
{int num; struct NODE *next;
}OLD;
以下叙述中正确的是【 】。
A. 以上的说明形式非法
B. NODE是一个结构体类型
C. OLD是一一个结构体类型
D. OLD是一个结构体变量
[单项选择]以下程序的输出结果是 #include<stdio.h> struct st i int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[0],60,&it[0],60,&dt[0],}; main( ) { p=aa; printf("%d/n",++(p->x));}
A. 10
B. 11
C. 51
D. 60
[单项选择]以下程序的输出是______。 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 x;int*y;}*pt;
int a[]={l,2},b[]={3,4};
struct st C[2]={l0,a,20,b}
pt=C;
以下选项中表达式的值为11的是【 】。
A. *pt->Y
B. pt->X
C. ++pt->x
D. (pt++)->X
[单项选择]有以下程序
#include
struct st
{int x,y;} data[2]={1,10,2,20};
main( )
{ struct st *p=data;
printf("%d,",p->y); printf("%d/n"(++p)->x);
}
程序的运行结果是
A. 10,1
B. 20,1
C. 10,2
D. 20,2
[单项选择]设有以下语句 ( ) 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. (* . n+ +
D. + +p - >n
[单项选择]以下程序的输出结果是 ( ) struct HAR { int x,y;struct HAR *p;} h[2]; main( ) { h[0].x=1;h[0].y=2; h[1].x=3;h[1].y=4; h[0].p=&h[1];h[1].p=h; printf("%d%d/n" h[0].p)->x,(h[1].p)->y); }
A. 12
B. 23
C. 14
D. 32
[单项选择]有以下程序段
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
[单项选择]若有以下程序段: 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
[单项选择]
有以下程序段
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