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