putc

Full prototype:

int putc(int, FILE*);  

Purpose and Notes:

Equivalent of fputc() except that it is a macro instead of a function. This means that the argument passed in should never be a an expression with side effects because how it is evaluated is different than a function call.

Writes the character passed in as the first argument (int instead of char because of characters like EOF) to the stream associated with the second argument's FILE*.

Returns:

int- The character written to the stream (int instead of char because of the EOF character). On error it will return EOF and will set the error indicators for the stream associated with the second argument's FILE*.

Argument 1:

int- The character (including EOF thus int instead of char) to write to the stream associated with the second argument's FILE*.

Argument 2:

FILE*- The stream associated with the FILE pointer you want to write the character too.

Example 1
  1    FILLER SOURCE CODE
FILLER TERMINAL