niusouti.com

下列程序段的输出结果是( )。A.passwarnB.passerrorC.goodpasswarnD.pass

题目

下列程序段的输出结果是( )。

A.passwarn

B.passerror

C.goodpasswarn

D.pass


相似考题
更多“ 下列程序段的输出结果是( )。A.passwarnB.passerrorC.goodpasswarnD.pass ”相关问题
  • 第1题:

    以下程序段中的变量已正确定义: 程序段的输出结果是( )。 A.********B.****

    以下程序段中的变量已正确定义:程序段的输出结果是( )。

    A.********

    B.****

    C.**

    D.*


    正确答案:D
    本题考察for循环语句,注意第二个for语句的后面有一个分号,即printf函数不属于循环体,无论循环执行多少次,printf(”*”)语句只执行一次。因此,本题正确答案为D)。

  • 第2题:

    下列程序段的输出结果是( )。 ACCEPT TO A IF A=[123] S=0 ENDIF S=1 ?SA.0B.1SX

    下列程序段的输出结果是( )。 ACCEPT TO A IF A=[123] S=0 ENDIF S=1 ?S

    A.0

    B.1

    C.123

    D.由A的值决定


    正确答案:B
    B。【解析】虽然在IF语句中S的值是由A的值决定,但是,在输出前S的值又被重新赋值,所以输出结果为l。

  • 第3题:

    【单选题】下面程序段的输出结果是______。 int n= int n='c'; switch(n++) {default: printf("error"); break; case 'a': case 'A': case 'b': case 'B': printf("good"); break; case 'c': case 'C': printf("pass"); case 'd': case 'D': printf("warn"); }

    A.passwarn

    B.passerror

    C.goodpasswarn

    D.pass


    inta=15,b=10,c=20,d

  • 第4题:

    下列程序段的输出结果是( )。

    A.0

    B.a

    C.f

    D.5


    正确答案:D
    a和f的ASCⅡ值相差5。

  • 第5题:

    下列程序段的输出结果是_____。

    cout < < fixed < < 509.123456789 < < endl;


    正确答案:123457
    123457 解析:fixed的意义是在小数点后保留6位,所以 fixed输出为509.123457。