C putchar()
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
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve 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