fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. if (false)
  7. {
  8. cout << "I'm in if " << endl;
  9. }
  10. else if (int x=2 && true)
  11. {
  12. cout << "I'm in else if " << x << endl;
  13. }
  14. else
  15. {
  16. int y = x;
  17. cout << y << endl;
  18. }
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
I'm in else if 1