Versions Compared

Key

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

...

Non-Compliant Code Example

In this non-compliant code example, more than one character is pushed back on the stream referenced by fptr.

Code Block
bgColor#ffcccc
FILE* fptr = fopen(file_name, "rb");
if (fptr == NULL) {
  /* Handle Error */
}

/* Read data */

ungetc('\n', fptr);
ungetc('\r', fptr);

/* Continue on */

...