fork download
  1. #include <stdio.h>
  2.  
  3. int func()
  4. {
  5. static int x;
  6. x = 5;
  7. x--;
  8. return (x);
  9. }
  10.  
  11. int main(int ac, char **av)
  12. {
  13. int x;
  14.  
  15. x = 5;
  16. while (x != 0)
  17. {
  18. printf("%i\n", func());
  19. x--;
  20. }
  21. }
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
4
4
4
4
4