Code Snippets C

#include
int main ()
{
FILE *file;
file = fopen("myfile.txt","r");
if (file==NULL)
perror ("Error opening myfile.txt");
else {
fputc ('e',file);
if (ferror (file))
printf ("Error Writing to myfile.txt\n");
fclose (file);
}
return 0;
}