fork download
  1. #include <stdio.h>
  2.  
  3. int x = 1;
  4.  
  5. void print_x(void) {
  6. int x = 10;
  7. printf("%d\n", x);
  8. }
  9.  
  10. int main(void) {
  11. printf("%d\n", x);
  12. int x = 100;
  13. print_x();
  14. for (int i = 0; i < 3; i++) {
  15. int x = 1000 + i;
  16. printf("%d\n", x);
  17. x++;
  18. }
  19. return 0;
  20. }
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
1
10
1000
1001
1002