首页 > 干部教育培训> 保密安全知识
题目内容 (请给出正确答案)
[单选题]

下列程序的输出结果为()。#includevoid main(){int a[] = {1, 2, 3, 4, 5}, i;for(i=1; i<5; i++){printf("%d", a[i]-a[i-1]);}}

A.1234

B.2345

C.11111

D.1111

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“下列程序的输出结果为()。#includevoid main…”相关的问题
第1题
有以下程序,程序中库函数islower(ch)用以判断ch中的字*是否为小写字* include<stdio.h> includ

有以下程序,程序中库函数islower(ch)用以判断ch中的字*是否为小写字* include<stdio.h> include<ctype.h> yoidfun(char*p) {inti=0; while(p[i]) {iffp[i]=&&islower(p[i-1]))p[i-1]=p[i-1]=p[i-1]-a+A; i++: } } main() {chars1[100]=abcdEFG!; fun(s1);printf(%s\n,s1); } 程序运行后的输出结果是

A.abcdEFg!

B.abcdEFG!

C.abcdEFg!

D.abcDEFG!

点击查看答案
第2题
下列程序的输出结果为______ Sub Prin() Dim B As String A=1 B=A & Space(4)& A P

下列程序的输出结果为______ Sub Prin() Dim B As String A=1 B=A & Space(4)& A Print A Print Trim(B) End Sub

点击查看答案
第3题
下列程序段的输出结果为__________。 int a=2; switch (a) { case2: System.

下列程序段的输出结果为__________。 int a=2; switch (a) { case2: System.out.print("Value is2."); case3: System.out.pritln("Value is3."); break; default: System.out.println("end"); break: }

点击查看答案
第4题
下列程序的输出结果为【 】。 num=2 While num<=3 num=num+1 Print num Wend

点击查看答案
第5题
执行下列语句后,程序的输出结果为【 】。 x=6: y=2: z=5 Print z=x-y

点击查看答案
第6题
下列程序段的输出结果为【 】。 public class Test { void printValue(int m) {

下列程序段的输出结果为【 】。 public class Test { void printValue(int m) { do { Systern.out,println("The value is "+m); } while(-m>10); } public static void main(String arg[]){ int i=10; Test t=new Test(); t.print Value(i); } }

点击查看答案
第7题
阅读下列程序,则程序的输出结果为【 】。 include"stdio.h" struct ty {
int data; char c;}; main() { struct ty a={30,x}; fun(a); printf("%d%c",a.data,a.c);} fun(struct ty b) { b.data=20; b.c=y;}

点击查看答案
第8题
阅读下列程序,则程序的输出结果为______。 include "stdio.h" struet ty { int data;
char c;}; main() { street ty a={30,x}; fun(a); printf("%d%c",a.data,a.c);} fun(struct ty b) { b.data=20; b.c=y;}

点击查看答案
第9题
写出下列程序段的输出结果(栈的元素类型SElemType为char)。 void main() { Stack S; char x,y; lnit

写出下列程序段的输出结果(栈的元素类型SElemType为char)。

void main()

{

Stack S;

char x,y;

lnitStack(S);

x='c';

y='k';

Push(S,x);

Push(S,'a');

Push(S,y);

Pop(S,x);

Push(S,'t');

Push(S,x);

Pop(S,x);

Push(S,'s');

While(!StackEmpty(S))

{

Pop(S,y);

printf(y);

}

printf(x);

}

点击查看答案
第10题
有下列程序: include<stdio.h> main() {char c; while((c=getchar())!=,)putcha

有下列程序: include<stdio.h> main() {char c; while((c=getchar())!=,)putchar(C) ; } 程序运行时,如果从键盘输入:A,B,<CR>,则输出结果为______。

点击查看答案
第11题
下列是Java程序,演示的是变量类型的强制转换,请补充划线的部分,使输出结果为b=12。 public cla
s sTestaaa{ public static void main(String args[ ]) { short S=12; byte b=【 】; //将s变量强制转换成byte类型 System.out.print("b="+b) ; } }

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