fork download
  1. #include <stdio.h>
  2. int g = 0;
  3.  
  4. void f(void) {
  5. static int s = 0;
  6. int l = 0;
  7. s++;
  8. l++;
  9. g += 2;
  10. printf("%d %d %d\n", s, l, g);
  11. }
  12.  
  13. int main(void) {
  14. f();
  15. f();
  16. f();
  17. printf("%d\n", g);
  18. return 0;
  19. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
1 1 2
2 1 4
3 1 6
6