Difference between putchar (), putch (), fputchar ()?

I read these concepts from a book, and I searched a lot on the Internet, but there is no good definition and explanation. Throughout just written that putch(), putchar()and fputchar()work the same way and used for printing characters on the console, but I think that between them should be something else?

+4
source share
3 answers

This simple manual page certainly describes the differences , albeit briefly:

  • fputc()writes a character c, passed to unsigned char, into the stream.
  • putc()equivalent fputc(), except that it can be implemented as a macro that evaluates a thread more than once.
  • putchar(c)equivalent to putc(c, stdout).
+6

:

int fputc(int c, FILE *stream);

int putc(int c, FILE *stream);

int putchar(int c);

fputc() c ( `` unsigned char '') , .

putc() fputc(), , . , , putc(), .

putchar() putc() .

0

putch conio.h Linux wiki, C .

putchar stdio. h, Linux.

0

All Articles