codescracker


c

C putchar()



« Previous Function Next Function »


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

#include<stdio.h>
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++)
{
	puchar(*str);
}

« Previous Function Next Function »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test