Question: fgetc how does it work?
Answer: fgetc() is used to obtain input from a file single character at a time. ... It returns the character present at position indicated by file pointer. After reading the character, the file pointer is advanced to next character. If pointer is at end of file or if an error occurs EOF file is returned by this function.