fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. void Add_NUM();
  4. int main ()
  5. {
  6. int count;
  7. for(count=0;count<5;count++)
  8. {
  9. Add_NUM();
  10. }
  11. system("PAUSE");
  12. return 0;
  13. }
  14.  
  15. void Add_NUM()
  16. {
  17. static int static_Num=1;
  18. printf("static_Num=%d\n",static_Num);
  19. static_Num++;
  20. }
Success #stdin #stdout #stderr 0s 2168KB
stdin
Standard input is empty
stdout
static_Num=1
static_Num=2
static_Num=3
static_Num=4
static_Num=5
stderr
sh: 1: PAUSE: not found