putchar()

Anonymous contributor's avatar
Anonymous contributor
Anonymous contributor's avatar
Anonymous contributor
Published Oct 28, 2022
Contribute to Docs

The putchar(), or “put character”, function prints a single character to stdout (normally the console).

Syntax

putchar(char)

The putchar() takes a single char as an argument and prints it.

Example

#include <stdio.h>
int main(void) {
putchar('a');
return 0;
}

The output would be:

a

All contributors

Looking to contribute?

Learn C on Codecademy