what is the purpose of putchar functionputchar


What is the purpose of putchar function

Putchar writes one character to the standard output file, stdout.

Syntax

#include

int putchar(int c);

The putchar macro writes one character, c, to the preopened file pointed to by stdout. The file pointed to by stdout is usually associated with the terminal's screen. If a write error occurs, putchar sets the error indicator for stdout. When a write error occurs, putchar sets the external variables errno and os_errno to the appropriate error code number. The putchar  macro  can  evaluate  its  argument  more  than  once  or  not  at  all.  Therefore,  the argument to putchar should never be an expression with side effects. The putchar macro returns an integer value representing the character written to stdout. If a write error occurs, putchar returns EOF.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: what is the purpose of putchar functionputchar
Reference No:- TGS0305459

Expected delivery within 24 Hours