fork(3) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. bool a = true;
  6. bool b = false;
  7. cout << "a = " << a << endl;
  8. cout << "b = " << b << endl;
  9. cout << boolalpha << "a = " << a << endl;
  10. cout << boolalpha << "b = " << b << endl;
  11.  
  12. int c = a << 1;
  13. int d = b << 1;
  14. bool e = a << 1;
  15. cout << "c = " << c << endl;
  16. cout << "d = " << d << endl;
  17. cout << "e = " << e << endl;
  18. return 0;
  19. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
a = 1
b = 0
a = true
b = false
c = 2
d = 0
e = true