信息系统开发与维护(专科)

下面这段代码的运行结果是()。 Dim MyStringBuilder As New StringBuilder("Hello World!") MyStringBuilder.Replace("!"c, "?"c) Console.WriteLine(MyStringBuilder)A、HelloWorld?cB、HelloWorld?C、HelloWorld!cD、HelloWorld!

题目

下面这段代码的运行结果是()。 Dim MyStringBuilder As New StringBuilder("Hello World!") MyStringBuilder.Replace("!"c, "?"c) Console.WriteLine(MyStringBuilder)

  • A、HelloWorld?c
  • B、HelloWorld?
  • C、HelloWorld!c
  • D、HelloWorld!
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

写“HelloWorld”的正确javascript语法是:

A、document.write("HelloWorld")

B、"HelloWorld"

C、response.write("HelloWorld")

D、("HelloWorld")


参考答案:A

第2题:

publicclassX{publicstaticvoidmain(String[]args){strings=newstring(Hello”);modify(s);System.out.printIn(s);}publicstaticvoidmodify(Strings){s+=world!”;}}Whatistheresult?()

A.Theprogramrunsandprints“Hello”

B.Anerrorcausescompilationtofail.

C.Theprogramrunsandprints“Helloworld!”

D.Theprogramrunsbutabortswithanexception.


参考答案:A

第3题:

对于如下C语言程序

intmain(){

printf("HelloWorld\n");

fork();

printf("HelloWorld\n");}

在UNIX操作系统中正确编译链接后,其正确的运行结果是

A.共打印出2行HelloWorld

B.共打印出3行HelloWorld

C.共打印出4行HelloWorld

D.共打印出5行HelloWorld


正确答案:B

第4题:

以下正确输出helloworld的是()

A.printf("helloworld");

B.printf("helloworld")

C.print("helloworld");

D.print("helloworld")


正确答案:D

第5题:

publicclassX{publicstaticvoidmain(Stringargs){strings=newstring(Hello”);modify(s);System.out.printIn(s);}publicstaticvoidmodify(Strings){s+=world!”;}}Whatistheresult?()

A.Theprogramrunsandprints“Hello”

B.Anerrorcausescompilationtofail.

C.Theprogramrunsandprints“Helloworld!”

D.Theprogramrunsbutabortswithanexception.


参考答案:A

第6题:

publicclassFoo{publicvoidmain(String[]args){system.out.printIn(HelloWorld.”);}}Whatistheresult?()

A.Anexceptionisthrown.

B.Thecodedoesnocompile.

C.“HelloWorld.”Isprintedtotheterminal.

D.Theprogramexitswithoutprintinganything.


参考答案:A

第7题:

publicclassFoo{publicvoidmain(Stringargs){system.out.printIn(HelloWorld.”);}}Whatistheresult?()

A.Anexceptionisthrown.

B.Thecodedoesnocompile.

C.“HelloWorld.”Isprintedtotheterminal.

D.Theprogramexitswithoutprintinganything.


参考答案:A

第8题:

在下面Java Applet程序的下画线处填入代码,使程序完整并能够正确运行。

import java.applet.*;

import java.awt.*;

public class HelloWorld ______ {

public void paint(Graphics g) {

g.drawString("Hello World!",25,25);

}

}


正确答案:extends Applet
extends Applet

第9题:

如何使用 PHP 输出 "hello world"()

A."HelloWorld";

B.echo"HelloWorld";

C.Document.Write("HelloWorld");

D.write(“HelloWorld”);


参考答案:B

第10题:

下面输出与其他不一致的是?()

  • A、valw="World";println(s"Hello$w")
  • B、valw="World";println("Hello$w")
  • C、println("HelloWorld")
  • D、valw="World";println("Hello"+w)

正确答案:B

更多相关问题