fork download
  1. #include <stdio.h>
  2.  
  3. int a = 0; // グローバル変数
  4.  
  5. void func(void) {
  6. a++;
  7. }
  8.  
  9. int main(void) {
  10. int b = 5; // ローカル変数
  11.  
  12. for (int i = 0; i < b; i++) {
  13. func();
  14. }
  15.  
  16. printf("%d\n", a);
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 544KB
stdin
Standard input is empty
stdout
5