fork download
  1. #include<stdio.h>
  2.  
  3. int openfile(char *s,FILE *fp)
  4. {
  5. fp=fopen(s,"r");
  6. printf("fp===%d\n",fp);
  7. return fp?1:0;
  8. }
  9. #if 1
  10. int main()
  11. {
  12. FILE *fp;
  13. if(openfile("./readme.txt",fp)==0)
  14. {
  15. printf("hello world\n");
  16. fclose(fp);
  17. }
  18. system("pause");
  19. return 0;
  20. }
  21. #endif
Runtime error #stdin #stdout 0s 4184KB
stdin
Standard input is empty
stdout
Standard output is empty