fputc() converts the int value c into the corresponding char value, and writes that to the next sequential position in the open file identified by the file pointer stream. The return value is normally set to be equal to the input argument c; however, if any error is encountered then the return value will be EOF and errno will be set appropriately.