cplusplus.com > reference > cstdio > fputchar |
fputchar
<stdio.h> |
cplusplus.com |
Write character to stdout.
Writes character to standard output.
It is equivalent to fputchar (character,stdout);
Parameter.
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>
int 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