fork download
  1. #include <stdio.h>
  2. int func(){
  3. static int x=1;
  4. x=x*2;
  5. return x;
  6. }
  7. int main(void){
  8. int i;
  9. for(i=0;i<5;i++){
  10. printf("%d\n", func());
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
2
4
8
16
32