fork(1) download
  1. #include <iostream>
  2.  
  3. void test1(void)
  4. {
  5. int a = 1;
  6. std::cout << a << a++ << std::endl;
  7. }
  8.  
  9. void test2(void)
  10. {
  11. int a = 1;
  12. std::cout << a++ << a << std::endl;
  13. }
  14.  
  15. void test3(void)
  16. {
  17. int a = 1;
  18. std::cout << a++ << a++ << std::endl;
  19. }
  20.  
  21. int main()
  22. {
  23. test1();
  24. test2();
  25. test3();
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 4264KB
stdin
Standard input is empty
stdout
21
12
21