下面程序的结果为 【 】 。 #include<iostream.h> void main( ) { int a=1,b=2; bool c=1; if((a>b) ||c)

admin2010-03-29  23

问题 下面程序的结果为 【  】 。
   #include<iostream.h>   
   void main( )
   {
         int a=1,b=2;
         bool c=1;
         if((a>b) ||c) cout<<"true"<< end1;
         else
               cout<<"false"<<end1;
   }

选项

答案

解析 本题考查的是对于逻辑运算符号的理解,“||”运算符的任何一边取值为真,则整个运算结果为真。
转载请注明原文地址:https://kaotiyun.com/show/rPjp777K
0

随机试题
最新回复(0)