I'm a beginner and I've been confused with the error for two days.
Can somebody help me to point out which part of my code goes wrong? Thanks.
code:
Code:int main() {FILE *fr; fr=fopen("d:\\doc.txt","r+"); if (fr==NULL) {printf("Error"); exit(1);} char s[256]; fscanf(fr, "%s", s); printf("The text is %s", s); fprintf(fr, "asdd"); fscanf(fr, "%s", s); printf("\nThe text now is %s", s); return 0; }



LinkBack URL
About LinkBacks


