C putchar()

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).

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours

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

Contribute to Docs

Learn C on Codecademy

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours