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