题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-11-27 23:23:43

[单选题]以下程序输出结果是 。 #include "stdio.h" void f (); main() {int a; for(a=1;a<=3;a++) fun(); } void fun() {static int i=1; i+=3; printf("%2d",i); }
A.4 7 10
B.4 4 4
C.4 5 6
D.4 6 8

更多"[单选题]以下程序输出结果是 。 #inc"的相关试题:

[单选题]以下程序的输出结果是( )。
#include
Using namespace std;
Int main() {
int a=0, i;
for (i=0;i<5;i++)
{
switch (i)
{
case 0:
case 3:a+=2;break;
case 1:
case 2:a+=3;
default:a+=5;
}
}
cout << a < return 0;
}
A. 10
B. 20
C. 25
D. 30
[单选题]以下程序运行后输出结果是( )
#include
Using namespace std;
Int
A,b;
Void f()
{ int x=20,y=25;
a=a+x+y;
b=b+x-y;
}
Int main()
{ int x=9,y=7;
a=x+y;b=x-y;
f();
cout << a << "," << b << endl;
return 0;
}
A. 61,-3
B. 16,2
C. 25,-5
D. 以上都不正确
[填空题]以下程序的输出结果是__()____。
#include
Using namespace std;
Int main(
{
int s,i;
for ( s=0,i=1; i<4; i++,s+=i );
cout << s << endl;
return 0;
}
[单选题]以下程序的输出结果是( ) #define M(x,y,z) x*y+z void main() { int a=1,b=2, c=3; cout<A.19
B.17
C.15
D.12
[简答题]以下程序输出的最后一个值是____。
#include
Using namespace std;
Int ff(int n)
{ static int f=1;
f=f*n;
return (f);
}
Int main( )
{ for (int i=1;i<=5;i++)
cout << ff(i) << endl;
return 0;
}
[单选题]以下程序输出结果是()。        main() { int m=5; if(m++>5) printf("%d\n",m); esle printf("%d\n",m- -); }
A.7
B.6
C.5
D.4
[单选题]下面程序的输出结果是( )
#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
[单选题]运行如下程序,输出结果是( )。
#include
Using namespace std;
Int main(){
int a=2,b=-1,c=2;
if(a if(b<0) c=0;
else c+=1;
cout << c << endl;
return 0;
}
A. 0
B. 1
C. 2
D. 3
[单选题]下面程序的输出结果是( )。
#include
Using namespace std;
Void add()
{
static int a;
a++;
cout<}
Int main()
{
for(int i=0;i<3;i++)
add();
return 0;
}
A. 1 1 1
B. 1 2 3
C. 2 2 2
D. 3 3 3
[单选题]以下程序的输出结果是().
Private Sub Command1_Click()
a=100
Do
s=s+a
a=a+1
Loop Until a>100
print a
End Sub
A.100
B.120
C.201
D.101
[单选题]执行下列语句后,程序的输出结果是( )。
#include
Using namespace std;
Int main( )
{
int n=10;
while(n>7){
n--;
cout< }
cout<}
A. 10,9,8
B. 9,8,7
C. 10,9,8,7
D. 9,8,7,6
[单选题]执行下列程序后,输出结果是( )。
#include
Using namespace std;
Void f(int x)
{
if(x)
{
cout.put(‘0’+x%10);
f(x/10);
}
}
Int main()
{
f(11001);
return 0;
}
A. 11001
B. 10001
C. 11100
D. 10011
[单选题]下列程序运行后的输出结果是( )。
#include
Using namespace std;
Int main()
{
int x,y,z;
for (x=0;x<=3;x++)
z=x;
for (y=5;y>=1;y--)
z+=y;
cout << z << endl;
return 0;
}
A. 15
B. 16
C. 17
D. 18
[单选题]下列程序执行后的输出结果是( )。
#include
#include
Using namespace std;
Int main()
{ char arr[2][4];
strcpy(arr[0],"you");
strcpy(arr[1],"me");
arr[0][3]=′&′;
cout << arr[0]; //因第一行无\0,故第二行接着输出
return 0;
}
A. you&me
B. you
C. me
D. err
[单选题]当输入4时,以下程序的输出结果是().
Private Sub Command1_Click()
x=InputBox(x)
If x^2<15 Then y=1/x
If x^2>15 Then y=x^2+1
Print y
End Sub
A.4
B.17
C.18
D.25
[单选题]以下程序的输出结果是( )。
Long fun( int n)
{ long s;
if(n==1||n==2) s=2;
else s=n-fun(n-1);
return s;
}
Int main()
{
cout << fun(3) << endl;
return 0;
}
A. 1
B. 2
C. 3
D. 4
[单选题]以下程序的运行结果是( )。
#include
Using namespace std;
Int main()
{
int x=1;
switch(x)
{ case 1:++x;
case 0:--x;
default: x+=7;
}
cout << x << endl;
return 0;
}
A. 2
B. 1
C. 7
D. 8

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码