更多"[单选题]若int x;且有下面的程序片断,则输出结果是() 。
fo"的相关试题:
[单选题]请读程序.则下面程序的输出结果是( ) m=1234.123; pitf(%8.3f3n",m); pit("%10.3n"r,m);
A.1234.12300- 1234.123... 选项1
B.1234.123 1234.123 选项34
C.1234.123 1234.12300- 选项33
D.1234.12300 1234.123 选项2
[单选题]下面程序的输出结果是()。
#include
#include
main()
{ char *p1="abc",*p2="ABC",str[50]= "xyz";
strcpy(str+2,strcat(p1,p2));
printf("%s\n",str);}
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC
[单选题]下面程序的输出结果是( )
#include
Void main( )
{ int x=10,y=10,i;
For(i=0;x>8;y=++i)
Printf("%d %d ",x--,y); }
A. 10 1 9 2
B. 9 8 7 6
C. 10 9 9 0
D. 10 10 9 1
[单选题]下面程序的输出结果为()。
struct st
{ int x;
int *y;
} *p;
int dt[4]={10,20,30,40};
struct st aa[4]={ 50,&dt[0],60,&dt[1],70,&dt[2],80,&dt[3] };
main()
{ p=aa;
printf("%d\n", ++p->x );
printf("%d\n", (++p)->x);
printf("%d\n", ++( *p->y));
}
A.10
20
20
B.50
20
20
C.51
60
21
D.60
70
31
[单选题]已知字符0的ASCII码为十六进制的30,下面程序的输出是()。
main()
{ union { unsigned char c;
unsigned int i[4];
} z;
z.i[0]=0x39;
z.i[1]=0x36;
printf("%c\n",z.c);}
A.6
B.9
C.0
D.3
[单选题]下面程序的输出结果是 ( )。
main()
{ int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a;
printf("%d\n",*(p+2));}
A.3
B.4
C.1
D.2
[单选题]下面程序的输出是( )
Main() { int a=-1, b=4, k;
K=(a++<=0)&&(!(b--<=0));
Printf("%d %d %d \n", k,
A, b ); }
A.. 0 0 3
B.. 0 1 2
C.. 1 0 3
D.. 1 1 2
[单选题]下面程序的输出结果为()。
main()
{ int a,b;b=(a=3*5,a*4,a*5);
printf("%d",b);
}
A.60
B.75
C.65
D.无确定值
[单选题]下面程序的输出结果是 ( )
Int i=0,j=0,a=6;
If((++i>0)||(++j>0)) a++;
Printf("i=%d,j=%d,a=%d\n",i,j,A.;
A.i=0,j=0,a=6
B.i=1,j=0,a=7
C.i=1,j=1,a=6
D.i=1,j=1,a=7
[单选题]下面程序输出得值为()
Importmath
Math.fabs(-3)
A.-3
B.3
C.-3.0
D.3.0
[单选题]若x 和y 都是int 型变量,x=100,y=200, 且有下面的程序片段 printf("%d",(x,y));上面程序片段的输出结果是 ( )
A. 200
B. 100
C. 100 200
D. 输出格式符不够,输出不确定的值
[单选题]若x 和y 都是int 型变量,x=100,y=200, 且有下面的程序片段
Printf("%d",(x,y) ));
上面程序片段的输出结果是( )
A.200
B.100
C.100 200
D.输出格式符不够,输出不确定的值
[单选题]下面程序输出数组中的最大值,由s指针指向该元素.
main()
{ int a[10]={6,7,2,9,1,10,5,8,4,3,},*p,*s;
flr(p=a, s=a; p-a<10; p++)
if(_________)s=p;
printf("The max:%d",*s):
}
则在if语句中的判断表达式应该是()。
A.p>s
B.*p>*s
C.a[p]>a[s]
D.p-a>p-
[单选题]下面程序段的输出结果是()
Ls=['Python','C++','Java']
Fork,vinenumerate(ls):
Print(k,v)
A.Python
C++
Java
B.0Python
1C++
2Java
C.Python1
C++2
Java3
D.3Python
4C++
5Java
[单选题]下面代码的输出结果是()
Name=“Python语言程序设计”
Print(name[2:–2])
A.thon语言程序
B.thon语言程序设
C.ython语言程序
D.程序出错
[单选题]下面的程序段运行后,输出结果是 ( )。
int i,j,x=0;
static int a[8][8];
for(i=0;i<3;i++)
for(j=0;j<3;j++)
a[i][j]=2*i+j;
for(i=0;i<8;i++)
x+=a[i][j];
printf("%d",x);
A.9
B.不确定值
C.0
D.18
[单选题]若执行下面的程序从键盘上输入9,则输出结果是( )
#include void main( ) {
Int n;
Scanf("%d",&n);
If (n++<10) printf("%d\n",n);
Else printf("%d\n",n--);
}
A.11
B. 10
C. 9
D. 8
[判断题]程序设计时,应将功能独立且有可能重复使用的程序段编写成子程序。
A.正确
B.错误
[单选题]下面代码的输出结果是
A.159
B.157
C.152
D.153