Putc : Write Single Character to specified Stream
Syntax :
#include<stdio.h>int putc( int ch, FILE *stream );
What it does ?
- It Writes Character onto the Stream.
- Its Return Value is Character Written on Stream.
- If any Error Occures then It returns EOF
Live Example :
#include<stdio.h>
int main(void) { char msg[] = "Hellon"; int i = 0;
while (msg[i]) putc(msg[i++], stdout); return 0; }Output :
Writes “Hello” Word to File Character by Character
Diagram :
Bookmark & Share 

