更多"有以下程序
#include
main( )
{ struc"的相关试题:
[单项选择]有以下程序
#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
[单项选择]
有以下程序
#include
struct S
{ int a,b;}data[2]={10,100,20,200};
main( )
{ struct S p=data[1];
printf("%d/n",++(p.a));
}
程序运行后的输出结果是
A. 10
B. 11
C. 20
D. 21
[单项选择]
有以下程序
#include
struct ord
{ int x,y;}dt[2]={1,2,3,4};
main( )
{
struct ord *p=dt;
printf("%d,",++(p->x)); printf("%d/n",++(p->y));
}
程序运行后的输出结果是()
A. 1,2
B. 4,1
C. 3,4
D. 2,3
[单项选择]
有下列程序:
#include
struct tt
{ int x;struct tt *y;}*p;
struct tt a[4]={20,a+1,15,a+2,30,a+3,17,a};
main( )
{ int i;
p=a;
for(i=1;i<=2;i+ +) {printf("%d,",p->x);p=p->y;}
}
程序的运行结果是()。
A. 20,30,
B. 30,17
C. 15,30,
D. 20,15,
[单项选择]有以下函数
#include
struct stu
{int mun; char name[10]; int age;};
viod fun(struct stu *p)
{ printf(“%s/n”,p->name);}
mian( )
{ struct stu x[3]={{01,”zhang”,20},{02,”wang”,19},{03,”zhao”,18}};
fun(x+2);
}
程序运行输出结果是( )。
A. zhang
B. zhao
C. wang
D. 19
[单项选择]有以下程序:
#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);
程序的运行结果是( )。
[单项选择]有以下程序: #include<stdio.h> struct tt { int x;struct tt *y;} *p; struct tt a[4]={20,a+1,15,a+2,30,a+3,17,a}; main( ) {int i; p=a; for(i=1;i<=2;i++) {printf("%d,",p->x);p=p->y;} } 程序的运行结果是( )。
A. 20,30,
B. 30,17
C. 15,30,
D. 20,15,
[单项选择]有以下程序: #include<stdio.h> struct tt {int x;struct tt*y;}*p; struct tt a[4]={20,a+1,15,a+2,30,a+3,17,a} main( ) { int i; p=a; for(i=1;i<=2;i++){printf("%d",p->x);p=P->y;} } 程序的运行结果是______。
A. 20,30,
B. 30,17
C. 15,30
D. 20,15
[单项选择]以下程序的输出结果是 #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
[单项选择]以下程序的输出结果是 #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
[单项选择]
有以下程序
#include <stdio.h>
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
[单项选择]有以下程序: #include <stdio.h> struct s { int x,y;} data[2]={10,100,20,200}; main( ) { struct s *p=data; printf("%d/n",++(p->x)); 程序运行后的输出结果是( )。
A. 10
B. 11
C. 20
D. 21
[单项选择]
有以下程序
#include<stdio.h>
struct ord
{ int x,y;} dt[2]={1,2,3,4};
mare( )
{ struct ord*p=dt;
printf("%d,",++p->x); printf("%d/n",++p->y);
}
程序的运行结果是()。
A. 1,2
B. 2,3
C. 3,4
D. 4,1
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
struct ord
int x, y; dt[2]=1, 2, 3, 4;
main( )
struct ord *P=dt;
printf("%d,", ++p->x); printf("%d/n", ++p->y);
A. 1,2
B. 2,3
C. 3,4
D. 4,1
[单项选择]有以下程序段
typedef struct NODE
int num; struct NODE *next;
OLD;
以下叙述中正确的是
A. 以上的说朗形式非法
B. NODE是一个结构体类型
C. OLD是一个结构体类型
D. OLD是一个结构体变量
[单项选择]有以下程序:
#include <stdio.h>
struct s
int x,y; data[2]=10,100,20,200;
main( )
struct s *p=data;
printf("%d/n",++(p->x));
程序运行后的输出结果是( )。
A. 10
B. 11
C. 20
D. 21
[单项选择]以下程序的输出结果是( )。
#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