C++ 在这种情况下,为什么bool类型的输出等于0? #包括 #包括 使用名称空间std; int 主要() { cout 0xFF)| |(3*55*3); cout(0xFF); cout(5*3); 返回0; }

C++ 在这种情况下,为什么bool类型的输出等于0? #包括 #包括 使用名称空间std; int 主要() { cout 0xFF)| |(3*55*3); cout(0xFF); cout(5*3); 返回0; },c++,boolean,C++,Boolean,我得到001,即使据我所知应该是101。根据, #include <iostream> #include <cmath> using namespace std; int main () { cout << ('x' > 0xFF) || (3 * 5 < 35) && (53 > 5 * 3); cout << ('x' > 0xFF); cout << (3 * 5 < 3

我得到001,即使据我所知应该是101。

根据,

#include <iostream>
#include <cmath>
using namespace std;

int
main ()
{
  cout << ('x' > 0xFF) || (3 * 5 < 35) && (53 > 5 * 3);
  cout << ('x' > 0xFF);
  cout << (3 * 5 < 35) && (53 > 5 * 3);
  return 0;
}
cout << ('x' > 0xFF) || (3 * 5 < 35) && (53 > 5 * 3);
( cout << ('x' > 0xFF) )    || (3 * 5 < 35) && (53 > 5 * 3);
cout <<    ( ('x' > 0xFF) || (3 * 5 < 35) && (53 > 5 * 3) );