Putchar() function in C


Putchar() function in C :

The C library function putchar() , allows the user to display a string character by character. The putchar() function is a complement of getchar() function.

The putchar() function simply prints the ASCII value of the expression it receives as an argument. It transmits a single character to a standard output device i.e. the monitor .

A reference to the putchar() function is a follows
        putchar(character_variable);
where character_variable refers to some previously declared character variable.

A  C program contains the following statements
char c;         /*declares c as a character variable*/
….
….
putchar(c);     /*causes the current value of c to be transmitted to the standard output device (console) where it will be displayed */

Given below is an example program of putchar()
putchar() in c


Output for the above program:
output putchar() in c


Thank you …

 for more similar post : https://iamafutureprogrammer.blogspot.com/


Previous Post
Next Post
Related Posts

0 comments:

Popular Posts