Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ffcccc
FILE *fp;
char *file_name;

/* initialize file_name */

fp = fopen(file_name, "rb");
if (fp == NULL) {
  /* handle Error */
}

/* read data */

if (ungetc('\n', fp);
 == EOF) {
  /* handle error */
}
if (ungetc('\r', fp); == EOF) {
  /* handle error */
}

/* continue on */

Compliant Solution

...