C Language: putchar function(Write Character)

In the C Programming Language, the putchar function writes a character to the stdout stream.


The syntax for the putchar function in the C Language is:

int putchar(int c);


The putchar function returns the character written. If an error occurs, the putchar function will set the stdout's error indicator and return EOF

Required Header

In the C Language, the required header for the putchar function is:

#include <stdio.h>

Applies To

In the C Language, the putchar function can be used in the following versions:

  • ANSI/ISO 9899-1990

stdio.h Functions