首页 > 大学专科> 电子信息
题目内容 (请给出正确答案)
[主观题]

阅读下列程序,则程序的输出结果为______。 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;}

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“阅读下列程序,则程序的输出结果为______。 includ…”相关的问题
第1题
阅读下列程序,则程序的输出结果为【 】。 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;}

点击查看答案
第2题
阅读下列的程序classPerson{undefinedstatic{undefinedSystem.out.println(“static”);}Person(){undefinedSystem.out.println(“构造”);}}classDemo{undefinedpublicstaticvoidmain(String[]args){undefinedPersonp=newPerson();}}下列选项中,程序的运行结果是()

A.构造

B.static构造

C.static

D.没有输出结果

点击查看答案
第3题
阅读以下程序,当输入数据的形式为:25,13,10<CR>,正确的输出结果为( )。 main() {int x,y,z; scanf("%d%d%d",&x,&y,&z); printf("x+y+z=%d\n",x+y+z); }

A.x+y+z=48

B.x+y+z=35

C.x+z=35

D.不确定

点击查看答案
第4题
阅读以下程序,输出结果为_________。 class D{ public static void main (String args[

阅读以下程序,输出结果为_________。 class D{ public static void main (String args[]){ int d=21; Dec dec=new Dec(); dec. decrement (d): System.out.println(d); } } class Dec{ public void decrement(int decMe){ decMe=decMe-1: } }

点击查看答案
第5题
阅读下列程序,则运行结果为 #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

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

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

点击查看答案
第7题
阅读以下程序,输出结果为_______。 import java.iO.*; public class abc { p
ublic static void main(Stringargs[]) { String sl="Hello!"; String s2=new String("I like Java!"); System.out.println(s1+""+s2); }

点击查看答案
第8题
请阅读下面的程序代码ClassPerson{undefinedvoidsay(){undefinedSystem.out.println(“hello”);}}classExample{undefinedpublicstaticvoidmain(String[]args){undefinedPersonp2=newPerson();Personp1=newPerson();p2.say();p1.say();p2=null;p2.say();}}下列关于程序运行结果的描述中,正确的是()

A.输出1个hello

B.输出2个hello后会抛出异常

C.输出3个hello后会抛出异常

D.不会输出hello,直接抛出异常

点击查看答案
第9题
阅读下列程序并写出程序运行结果。Public Sub change1(ByVal x As Integer, ByVal y As Integer
阅读下列程序并写出程序运行结果。Public Sub change1(ByVal x As Integer, ByVal y As Integer

阅读下列程序并写出程序运行结果。

Public Sub change1(ByVal x As Integer, ByVal y As Integer)

Dim t As Integer

t = x

x = y

y = t

End Sub

Public Sub change2(x As Integer, y As Integer)

Dim t As Integer

t = x

x = y

y = t

End Sub

Private Sub Form_Click()

Dim a As Integer, b As Integer

a = 22: b = 33

change1 a, b

Form1.Print "A1="; a, "B1="; b

a = 22: b = 33

change2 a, b

Form1.Print "A2="; a, "B2="; b

End Sub

写出程序运行时,单击窗体Form1上的输出结果。

点击查看答案
第10题
阅读下面程序,则程序的执行结果为【 】。 include"stdio.h" main() { int

阅读下面程序,则程序的执行结果为【 】。 include"stdio.h" main() { int a=30,b=20,z; z=fun(a+b,a-b); printf("%d\n",z);} fun(int a,int b) { int z; z=a/b; return z;}

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