C Programming/stdio.h/putchar

putchar is a function in the C programming language that writes a single character to the standard output stream, stdout. Its prototype is as follows:

The character to be printed is fed into the function as an argument, and if the writing is successful, the argument character is returned. Otherwise, end-of-file is returned.

The  function is specified in the C standard library header file stdio.h.

Sample usage
The following program uses  to read characters into an array and print them out using the   function after an end-of-file character is found.

The program specifies the reading length's maximum value at 1000 characters. It will stop reading either after reading 1000 characters or after reading in an end-of-file indicator, whichever comes first.