fputchar
int  fputchar (int character);
stdio.h
cplusplus.com

Write character to stdout.
Writes character to standard output.
It is equivalent to fputchar (character,stdout);

Parameter.

character
Character to be written. Although it is declared as int, the function converts it to unsigned char before writing it.

Return Value.
  The value returned is the written character. If an error occurs, EOF is returned.

Portability.
  Not defined in ANSI-C but supported in most compilers within stdio.h.

Example.

/* fputchar example: alphabet writer */
#include <stdio.h>

main ()
{
   char c;
   for (c = 'A' ; c <= 'Z' ; c++)
     fputchar (c);
   return 0;
}

  This program writes ABCDEFGHIJKLMNOPQRSTUVWXYZ to the standard output (screen).

See also.
  fputc, fgetc, putchar


© The C++ Resources Network, 2000