更多"以下程序运行后的输出结果是 #include<stdio.h> s"的相关试题:
[单项选择]以下程序运行后的输出结果是 #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
[单项选择]
有以下程序
#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<stdio.h>
struct ord
int x,y;)dt[2]=1,2,3,4;
main( )
struct ord*p=dt;
printf("%d,",++p->x);printf("%d,",++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};
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 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;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
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
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 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
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
main( )
{ struct node { int n; struct node *next;} *p;
struct node x[3]={{2, x+1},{4, x+2},{6, NULL}};
p=x;
printf("%d,",p->n);
printf("%d,",p->next->n);
}
程序运行后的输出结果是_______。
A. 2,3
B. 2,4
C. 3,4
D. 4,6
[单项选择]以下程序运行后的输出结果是
int f(int n)
if(n==1)return 1;
else return f(n-1)+1;
main( )
int i,j=0;
for(i=1;i<3;i++) j+=f(i);
printf("%d/n",j);
A. 4
B. 3
C. 2
D. 1
[单项选择]以下程序运行后的输出结果是 #include void fun(int P)
{ int d=2; P=d++; printf("%d", P);} main( )
{ int a=1; fun(a); printf("%d/n', a); }
A. 32
B. 12
C. 21
D. 22
[单项选择]有以下程序:
#include
#include
typedef struct char name[9];char sex;float score[2]; STU;
void f(STU
A. Qian,m,85,90
B. Zhao,f,95,92
C. Zhao,m,85,90
[单项选择]以下程序运行后的输出结果是 #include<stdio.h> int f(int x, int y) { return((y-x)*x); } main( ) { int a=3, b=4, c=5, d; d=f(f(a, b), f(a, c)); printf("%d/n", d); }
A. 10
B. 9
C. 8
D. 7
[单项选择]以下程序运行后的输出结果是
fun(int x,int y,int z) z=x*y;
main( )
int a=4,b=2,c=6;
fun(a,b,c);
printf("%d",c);
A. 16
B. 6
C. 8
D. 12
[单项选择]有以下程序: #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