fork(6) download
  1. #include<stdio.h>
  2. int f1(void);
  3. int f2(void);
  4. int f3(void);
  5. void f4(void);
  6. int x=10;
  7. int main()
  8. {
  9. int x=1;
  10. x += f1() + f2 () + f3() + f2();
  11. printf("%d \n", x);
  12. f4();
  13. return 0;
  14. }
  15. int f1() { int x = 25; x++; return x;}
  16. int f2() { static int x = 50; x++; return x;}
  17. int f3() { x *= 10; return x;}
  18. void f4() {printf("%d",x);} //prints global
Success #stdin #stdout 0s 9416KB
stdin
Standard input is empty
stdout
230 
100