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