[单选题]

下面程序段:boolean a=false;boolean b=true;boolean c=(a&&b)&&(!b);boolean result=(a&b)&(!b);执行完后,正确的结果是

A.c=false;result=false

B.c=true,result=true

C.c=true;result=false

D.c=false;result=true

参考答案与解析:

相关试题

下面程序段:boolean a=false;boolean b=true;boo

[单选题]下面程序段: boolean a=false; boolean b=true; boolean c=(a||b)&&(b); boolean result=(a|b)&(b); 执行完后,正确的结果是A.c=false;result=falseB.c=true,result=trueC.c=true;result=falseD.c=false;result=true

  • 查看答案
  • 下面程序段:boolean a=false;boolean b=true;boo

    [单选题]下面程序段: boolean a=false; boolean b=true; boolean c=(a&&B) &&(!B) ; boolean result=(a&B) &(!B) ; 执行完后,正确的结果是( )。A.c=false;result=falseB.c=true,result=trueC.c=tree;result=falseD.c=false;result=trae

  • 查看答案
  • boolean a=false;boolean b=true;boolean c

    [单选题]boolean a=false;boolean b=true;boolean c=(a&&b)&&(!b);boolean result=(a&amboolean a=false; boolean b=true; boolean c=(a&&b)&&(!b); boolean result=(a&b)&(!b); 执行完后,正确的结果是( )。A.c=false;result=falseB.c=true,result

  • 查看答案
  • 下列程序段:Int x=10,y=8;boolean b=true;System

    [单选题]下列程序段: Int x=10,y=8; boolean b=true; System.out.println(x>0&&x<y||b); 的结果为 ( )A.trueB.falseC.1D.0

  • 查看答案
  • 已知如下代码: boolean m=true; if(m==false) Sys

    [单选题]已知如下代码: boolean m=true; if(m==false) System.out.prinfln("False"); else System.out.println("True");A.假B.真C.NoneD.An error will occur when running

  • 查看答案
  • 当执行下面代码时,会输出()。Boolean b1 = new Boolean(

    [单选题]当执行下面代码时,会输出( )。 Boolean b1 = new Boolean(true); Boolean b2 = new Boolean(true); if (b1 == b2) if (bi.equals(b2)) System. out.printin ("a"); else System. out. println ("b"); else if (bi.equals(b2)) System. out.println ("c"); else System. out.pr

  • 查看答案
  • 为一个boolean类型变量赋值时,可以使用( )方式A、boolean=1;B

    [单选题]为一个boolean类型变量赋值时,可以使用( )方式A.boolean=1;B.booleana=(9>=10);C.booleana="真";D.booleana==false;

  • 查看答案
  • Simplify the following Boolean expressio

    [主观题]Simplify the following Boolean expression!((i ==12) || (j > 15))struct Node {int value;Node* next;};1.1 Get the value of the Nth node from last node in the linked list.PARAM HEAD: the first element in the linked list:PARAM n: the number of the nod

  • 查看答案
  • 设有如下变量声明语句:Dim a,b As Boolean则下面叙述中正确的是

    [单选题]设有如下变量声明语句:D.im a,b As Boolean则下面叙述中正确的是A.a和b都是布尔型变量B.a是变体型变量,b是布尔型变量C.a是整型变量,b是布尔型变量D.a和b都是变体型变量

  • 查看答案
  • 执行完下列代码段之后:bool x=true, y=false, z=false

    [单选题]执行完下列代码段之后: bool x=true, y=false, z=false; x=x&&y‖z; y=x‖y&&z; z=!(x!=y)‖(y-z); 则x=false, y=false, Z=( )。A.trueB.falseC.不确定D.异常

  • 查看答案
  • 下面程序段:boolean a=false;boolean b=true;boo