首页 > 计算机等级考试
题目内容 (请给出正确答案)
[单选题]

阅读下列程序,则运行结果为#include "stdio.h"fun(){ static int x=5;x++;return x;}main(){ int i,x;for(i=0;i<3;i++)x=fun();printf("%d\n",x);}

A.5

B.6

C.7

D.8

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“阅读下列程序,则运行结果为 #include "stdio.…”相关的问题
第1题
阅读下列程序,则运行结果为()。 A.3B.4C.5D.6

阅读下列程序,则运行结果为()。阅读下列程序,则运行结果为()。 A.3B.4C.5D.6阅读下列程序,则运行结果为()。  A.3

A.3

B.4

C.5

D.6

点击查看答案
第2题
阅读下列程序,则运行结果为#include"stdio.h"fun(){staticint x=5; x++; return x;}main(){int i

阅读下列程序,则运行结果为 #include"stdio.h" fun() { static int x=5; x++; return x;} main() { int i,x; for(i=0;i<3;i++) x=fun(); printf("%d\n",x);}

A.5

B.6

C.7

D.8

点击查看答案
第3题
阅读下列程序,则运行结果为 #include "stdio.h" fun() { staic int x=5; x++; return x;} main() { int i,x; for(i=0;i<3;i++) x=fun(); printf("%d\n",x);}

A.5

B.6

C.7

D.8

点击查看答案
第4题
阅读下列程序,则运行结果为 #include"stdio.h" fun() { static int x=5; x++; return x;} main() { int i,x; for(i=0;i<3;i++) x=fun(); printf("%d\n",x);}

A.5

B.6

C.7

D.8

点击查看答案
第5题
阅读下列程序段,程序运行后,显示结果为:()。阅读下列程序段,程序运行后,显示结果为:()。

A.4

B.5

C.7

D.9

点击查看答案
第6题
阅读下列程序片段。 Public void test{ Try{ sayHello; system.out.println("hello"): }catch(

阅读下列程序片段。 Public void test{ Try{ sayHello; system.out.println("hello"): }catch(ArraylndexOutOfBoundException e){ System.out.println("ArraylndexOutOfBoundExcep— tion"); }catch(Exception e){ System.out.println("Exception"): }finally{ System.Out.println("finally"); } } 如果sayHello方法正常运行,则test方法的运行结果将是()。

A.Hello

B.ArraylndexOutOfBondsException

C.Exception Finally

D.Hello Finally

点击查看答案
第7题
阅读以下程序,假设用户输入为18,则运行结果为()。 def f(m): return m*3 n=input('请输入一个整数:') print(f(n))

点击查看答案
第8题
阅读下列程序,则在执行后,程序的运行结果为#include"stdio.h"#include"string.h"main(){ char a[

阅读下列程序,则在执行后,程序的运行结果为 #include"stdio.h" #include"string.h" main() { char a[30]="nice to meet you!"; strcpy(a+strlen(a)/2,"you"); printf("%s\n",a);}

A.nice to meet you you

B.nice to

C.meet you you

D.nice to you

点击查看答案
第9题
阅读下列程序:Dim SW As BooleanFunction func(X As Integer)As IntegerIf X<20 Then Y=XElse Y=

阅读下列程序: Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func=Y End Function Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=False End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=True End Sub Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox(" ") If SW Then Print func(intNum) End If End Sub 程序运行后,单击一次窗体,再单击命令按钮,将显示一个输入对话框,如果在对话框中输入20,则程序的输出结果为

A.0

B.20

C.40

D.无任何输出

点击查看答案
第10题
阅读下列代码:publicclassTest{publicstaticvoidmain(Stringargs[]{System.out.println(100%3);S

阅读下列代码:publicclassTest{publicstaticvoidmain(Stringargs[]{System.out.println(100%3);System.out.pnntln(100%3.0);}}程序运行结果为()。

A.1和1

B.1和1.0

C.1.0各1

D.1.0和1.0

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改