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