fork download
  1. #include <stdio.h>
  2. void foopre(int n) {
  3. printf("pre");
  4. while (--n) printf(" %d", n);
  5. puts("");
  6. }
  7. void foopost(int n) {
  8. printf("post");
  9. while (n--) printf(" %d", n);
  10. puts("");
  11. }
  12. int main(void) {
  13. foopre(5);
  14. foopost(5);
  15. return 0;
  16. }
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
pre 4 3 2 1
post 4 3 2 1 0