fork(2) download
  1. #include <cstdio>
  2.  
  3. int foo(int a, int b, int c = 5)
  4. {
  5. std::printf("%d %d %d\n", a, b, c);
  6. }
  7.  
  8. int bar()
  9. {
  10. int foo(int a = 1, int b = 1, int c = 1);
  11. foo();
  12. }
  13.  
  14. int main()
  15. {
  16. foo(1, 2);
  17. int foo(int a, int b, int c = 8);
  18. foo(1, 2);
  19. int foo(int a, int b = 5, int c);
  20. foo(1);
  21. int foo(int a = 3, int b, int c);
  22. foo();
  23. bar();
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
1 2 5
1 2 8
1 5 8
3 5 8
1 1 1