fork download
  1. #include <stdio.h>
  2. int x;
  3. void mondai1(int b){
  4. x=b;
  5. }
  6. void mondai2(void){
  7. static int c=10;
  8. x=c;
  9. c++;
  10. }
  11. int mondai3(int d){
  12. x++;
  13. d++;
  14. return d;
  15. }
  16. int main(void){
  17. printf("x=%d\n", x);
  18. x=101;
  19. printf("x=%d\n", x);
  20. mondai1(102);
  21. printf("x=%d\n", x);
  22. mondai2();
  23. mondai2();
  24. mondai2();
  25. printf("x=%d\n",x);
  26. for(int i=103; i<104; i++){
  27. int x=i;
  28. printf("x=%d\n", x);
  29. x=mondai3(i);
  30. printf("x=%d\n", x);
  31. }
  32. printf("x=%d\n", x);
  33. return 0;
  34. }
  35.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
x=0
x=101
x=102
x=12
x=103
x=104
x=13