下列程序运行后的结果为( )。 #include void main() { int a=1,b=2; bool c=1: if

admin2021-07-02  22

问题 下列程序运行后的结果为(    )。
  #include
  void main()
  {
    int a=1,b=2;
    bool c=1:
    if<b)||c)cout<<"true"<    else
    cout<<"false"<  }

选项 A、false
B、true
C、2
D、1

答案B

解析 本题考查的是对于逻辑运算符号的理解,“||”运算符的任何一边取值为真,则整个运算结果为真。
0

最新回复(0)