Putchar () function in C
The function int putchar (int char) in standard C Library Writes a character (an unsigned char) defined by the char parameter to stdout.
The function int putchar (int char) in standard C Library Writes a character (an unsigned char) defined by the char parameter to stdout.
Declare putchar () function in C
Below is the declaration for putchar () function in C:
int putchar ( int char )
Parameters
char - This is the character written.
Returns the value
This function returns the character read as an unsigned char that is cast to an int or EOF or an error.
For example
The following program C illustrates the usage of putchar () function in C:
#include int main () { char ch ; for ( ch = 'A' ; ch <= 'Z' ; ch ++) { putchar ( ch ); } return ( 0 ); } Compiling and running the above C program will result:
According to Tutorialspoint
Previous post: Hàm putc () in C
Next lesson: Ham puts () in C
Discover more
running program C parameters in C Function ftell () in CShare by
Micah Soto
Update 25 May 2019
You should read it
- Function scanf () in C
- The getchar () function in C
- Function tmpfile () in C
- Function fscanf () in C
- The function sscanf () in C
- The Quiet Details That Make a Sports Betting Platform Feel Reliable
- Instructions on creating toy set images with ChatGPT AI
- How are AI agents changing the journalism industry?
- Function puts () in C
- The function ungetc () in C
- The function perror () in C