Returns the character read. To indicate a read error or end-of-file condition, getc returns EOF, and getwc returns WEOF. For getc, use ferror or feof to check for an error or for end of file. If stream is NULL, getc and getwc invoke the invalid parameter handler, as described in Parameter Validation. If execution is allowed to continue, these functions return EOF (or WEOF forgetwc) and set errno to EINVAL.