题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-08-08 00:28:53

[单选题]下列程序执行后的输出结果是()。 #define MA(x) x*(x-1) main() { int a=1,b=2; printf("%d \n",MA(1+a+b)); }
A.6
B.8
C.10
D.12

更多"[单选题]下列程序执行后的输出结果是()。 #define MA(x)"的相关试题:

[单选题]下列程序执行后的输出结果是( )。
#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
[单选题]下列命令按钮事件过程执行后,输出的结果是().Private Sub Command_Click()For m=.To 1.Step .a=.For n=0..To 9..Step .a=a+.Next n Next m Print a End Sub
A.10
B.60
C.50
D.30
[单选题]以下程序输出结果是 。 #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
[单选题]以下程序的输出结果是( ) #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
[单选题]下列程序的输出结果是: public class Test{   public static void main(String[] args){     int [] array={2,4,6,8,10};     int size=6;     int result=-1;     try{       for(int i=0;iA.Catch---1
B.Catch---2
C.Catch---3
D.以上都不对
[单选题]以下程序输出结果是()。        main() { int m=5; if(m++>5) printf("%d\n",m); esle printf("%d\n",m- -); }
A.7
B.6
C.5
D.4
[单选题]下面程序输出的结果是( )。
Int main()
{ int i;
int a[3][3]={1,2,3,4,5,6,7,8,9};
for(i=0;i<3;i++)
cout < return 0;
}
A. 1 5 9
B. 7 5 3
C. 3 5 7
D. 5 9 1
[单选题]窗体上有一个按钮和一个文本框,程序执行后,在文本框中输入12345,单击按钮后的输出结果为().
Private Sub Command1_Click()
Dim A As Integer,B As Integer
Textl.SelStart=.
Textl.SelLength=.
A=VaL(Textl.SelText)
B=Len(Textl.Text)
Print A*B
End Sub
A.68
B.115
C.170
D.1170
[单选题]请读程序:则下面程序的输出结果是( ) 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
[单选题]以下程序的输出结果是().
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 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
[单选题]阅读如下程序段,则程序在先后输入love和china后,输出结果是( )。
Int main()
{ char a[30],b[30];
int k;
gets(a);
gets(b);
k=strcmp(a,b);
if(k>0) puts(a);
else if(k<0) puts(b);
return 0;
}
A. love
B. china
C. lovechina
D. 没有输出结果
[单选题]当输入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
[单选题]下面程序的输出结果是( )
#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
[单选题]下面程序的输出结果是 For i = 2 To 5 Step 2 s = s + i Next i Print i
A.9
B.6
C.5
D.12
[单选题]下面程序的输出结果是 For i = 1 To 10 Step 2 s = s + i Next i Print i
A.9
B.10
C.11
D.12
[单选题]运行如下程序,输出结果是( )。
#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

我来回答:

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

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码