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
4 ★ | 1 Vote
You should read it
- The function gets () in C
- Function fputs () in C
- Function scanf () in C
- The getchar () function in C
- Function tmpfile () in C
- Function fscanf () in C
- The function sscanf () in C
- The function ungetc () in C
- The rewind () function in C
- The function perror () in C
- Function puts () in C
- The function atexit () in C
Maybe you are interested
Troubleshooting Chromebook Not Charging
How to use pictures as Excel chart columns
Bleach: Characters with the most changed appearances
Why do phones need wireless charging?
How to create names with special characters, add special characters to game names, game character names
How to prevent laptop battery from charging past 80% on Windows 11