fork download
  1. #include <stdio.h>
  2.  
  3. int x = 4;
  4. int func(int x){
  5. x += 3;
  6. return x;
  7. }
  8.  
  9. int read_x(void){
  10. return x;
  11. }
  12.  
  13. int main(void){
  14. int x = 2;
  15. int y = func(x);
  16.  
  17. printf("%d\n", y);
  18. printf("%d\n", x);
  19. printf("%d\n", read_x());
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5328KB
stdin
Standard input is empty
stdout
5
2
4