求大佬们帮忙看看这段代码
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 41
int main()
{
FILE *fp;
char words[MAX];
if ((fp = fopen("wordy", "a+")) == NULL)
{
fprintf(stdout, "Can't open \"wordy\" file.\n");
exit(EXIT_FAILURE);
}
puts("Enter words to add to the file; press the #"); //这里的#是什么意思?有何作用?
puts("key at the beginning of a line to terminate.");
while ((fscanf(stdin, "%40s", words) == 1) && (words[0] != '#')) //这里的#是什么意思?有何作用?
fprintf(fp, "%s\n", words);
puts("File contents:");
rewind(fp);
while (fscanf(fp, "%s", words) == 1)
puts(words);
puts("Done!");
if (fclose(fp) != 0)
fprintf(stderr, "Error closing file\n");
return 0;
}