更多"以下程序运行后的输出结果是 #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 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;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 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
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 abc { int a, b, c, s;}; main( ) { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d/n",t); }
A. 5
B. 6
C. 7
D. 8
[单项选择]以下程序在VC6平台上编译运行,程序运行后的输出结果是
#include<stdio.h>
main( )
int s, t, A=10; double B=6;
s=sizeof(
A. ; f=sizeof(
B. ;
C. 4,8
D. 10,6
[单项选择]以下程序在VC6平台上编译运行,程序运行后的输出结果是 #include<stdio.h> main( ){ int s, t, A=10; double B=6; s=sizeof(A); f=sizeof(B); printf("%d, %d/n", s, t); }
A. 2,4
B. 4,4
C. 4,8
D. 10,6
[单项选择]下列程序的输出结果是( )。#include<stdio.h>main( ){ struct st { int y, x,z; }; union { long i; int j; char k; }un; printf("%d,%d/n",sizeof(struct st),sizeof(un));}
A. 6,2
B. 6,4
C. 8,4
D. 8,6
[单项选择]有以下程序程序运行后的输出结果是【 】。
main( )
{ Int k=5,n=0;
do
{switch(k)
{case 1: case 3:n+=1;k--;break;
default:n=0;k;
case 2: case 4 : n+=2;k--;break;
}
printf("%d",n);
}while(k>0 &&n<5);
}
A. 235
B. 0235
C. 02356
D. 2356