Home > Back-end >  This error can change?
This error can change?

Time:10-08

The FILE * fp=fopen (" f: \ 1. TXT ", "r");
Char line [256].
The fgets (line, 256, fp);
The printf (line);
The fclose (fp);

CodePudding user response:

The FILE * fp=fopen (" f: \ 1. TXT ", "r");

The FILE * fp=fopen (" f: \ \ 1. TXT ", "r");

CodePudding user response:

Char line [256].
To:
Char line [260]
Memset (line, 0, sizieof (line));

Otherwise the following may overflow
The printf (line);
  • Related