fputc

hey! format of fputc is like this int fputc(FILE *stream ,int c)
but when we give it a character in 2nd parameter how things work means in it format we have to give int but even if we give character it works properly!

From the C Standard

7.21.7.3 The fputc function
Synopsis
1 #include <stdio.h>
int fputc(int c, FILE *stream);
Description
2 The fputc function writes the character specified by c (converted to an unsigned char) to the output stream pointed to by stream, at the position indicated by the associated file position indicator for the stream (if defined), and advances the indicator appropriately. If the file cannot support positioning requests, or if the stream was opened with append mode, the character is appended to the output stream.
Returns
3 The fputc function returns the character written. If a write error occurs, the error indicator for the stream is set and fputc returns EOF
can you specify it more i did't get that!
Last edited on
Switch on your brain. I am not your nanny.
Topic archived. No new replies allowed.