int openfile(FILE **fp,char filename[]) { char ch; fp = fopen(filename,"r"); while( (ch = fgetc(fp)) != EOF ) { printf("%c",ch); } return 0; } int main() { FILE *fp; openfile(&fp,"abc.txt"); fclose(fp); return 0; }
openfile
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)