下面程序输出的结果是: #include <stdio.h> void main() { char x=040; printf("%o ",x>
2. 下面程序输出的结果是: #include <stdio.h> void main() { char x=040; printf("%o ",x>>1); }
2. 下面程序输出的结果是: #include <stdio.h> void main() { char x=040; printf("%o ",x>>1); }
第1题
B、160
C、120
D、64
第2题
B、80
C、64
D、32
第3题
A、字符'h'
B、字符'i'
C、字符'e'
D、字符'e'的地址
第4题
A.6,2
B.6,4
C.8,4
D.8,6
第5题
a)
#i nclude <stdio.h>
union
{
int i;
char x[2];
}a;
void main()
{
a.x[0] = 10;
a.x[1] = 1;
printf("%d",a.i);
}
第6题
a)
#i nclude <stdio.h>
union
{
int i;
char x[2];
}a;
void main()
{
a.x[0] = 10;
a.x[1] = 1;
printf("%d",a.i);
}
第7题
#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
第8题
A.6 1
B.7 0
C.6 3
D.7 1
第9题
#include <stdio.h>
void fun( char. c)
{ if(c>'x') fun( c-1);
printf("%c",c);
}
main( )
{ fun(’z’); }
程序运行后的输出结果是
A) xyz
B) wxyz
C) zyxw
D)zyx
第10题
1.阅读程序,程序输出结果 (1) 。
#include<stdio.h>
main( )
{
int x,y;
x=-50%3;
y=50%(-3)
printf( "%d,%d\n" , x , y );
}
2.阅读程序,程序输出结果 (2) 。
#include<stdio.h>
main( )
{
char c='M',str;
str=c+32;
printf("%c\n",str);
}
3.阅读程序,程序输出结果 (3) 。
#include<stdio.h>
main( )
{
int a=10, b=14, y;
if (a<b) y=a*b;
else y=a/b;
printf ("y=%d\n",y);
}
4.阅读程序,程序输出结果 (4) 。
#include<stdio.h>
main( )
{
inta[3][4]={10,12,23,4,5,6,17,18,19,1,2,3},i,j,m;
m=a[0][0];
for(i=0;i<3;i++)
{
for(j=0;j<4;j++)
if(a[i][j]>m)m=a[i][j];
}
printf("m=%d\n",m);
}
5.阅读程序,程序输出结果 (5) 。
#include <stdio.h>
int fun(int n)
{ int i,y=1;
for(i=1; i<=n; i++)y=y*i;
return y;
}
main( )
{
int a=5,p;
p=fun(a);
printf("p=%d\n",p);
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!