C examples for stdio.h:putchar
function
<cstdio> <stdio.h>
Write character to stdout
int putchar ( int character );
Parameter | Description |
---|---|
character | The character. |
On success, the character written is returned.
On error, EOF is returned and the error indicator (ferror) is set.
This program writes ABCDEFGHIJKLMNOPQRSTUVWXYZ to the standard output.
#include <stdio.h> int main ()//from w w w . jav a2 s .c o m { char c; for (c = 'A' ; c <= 'Z' ; c++) putchar (c); return 0; }