## f_putc

The f_putc funciton puts a character to the file.

    int f_putc (
      TCHAR Chr,        /* A character to put */
      FIL* FileObject   /* File object */
    );

#### Parameters

Chr
  A character to be put.
FileObject
  Pointer to the open file object structuer.

#### Return Values

When the character was written successfuly, the function returns the character. When the function failed due to disk full or any error, an `EOF (-1)` will be returned.

When the FatFs is configured to Unicode API (`_LFN_UNICODE == 1`), the UCS-2 character is written to the file in UTF-8 encoding. If not the case, the byte will be written directly.

#### Description

The f_putc() is a wrapper function of f_write().

#### QuickInfo

Available when `_FS_READONLY == 0` and `_USE_STRFUNC` is 1 or 2. When it is set to 2, a `'\n'` is converted to `"\r\n"`.

#### See Also

`f_open, f_puts, f_printf, f_gets, f_close, FIL`

Return