C putchar()

The putchar() function writes the character contained in least significant byte of ch to the stdout. It is functionally equivalent to putc(ch, stdout). Because the character arguments are elevated to integer at the time of the call, you can use character values as the arguments to putchar().

putchar() Syntax

int putchar(int ch);

putchar() Example

Following loop writes to stdout the characters in string str. The null terminator is not written :

for(; *str; str++)

C Online Test

« Previous Function Next Function »

Like/Share Us on Facebook 😋