fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. bool f() {
  5.  
  6. cout << "f";
  7. return true;
  8. }
  9.  
  10. bool g() {
  11.  
  12. cout << "g";
  13. return true;
  14. }
  15.  
  16. int main() {
  17.  
  18.  
  19. if(f(),g())
  20. {
  21. cout<<"OK with ,";
  22. }
  23.  
  24. cout<<endl;
  25.  
  26. if(f()||g())
  27. {
  28.  
  29. cout<<"OK with ||";
  30. }
  31.  
  32. return 0;
  33. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
fgOK with ,
fOK with ||