The getc() function takes the file pointer as its argument, reads in the next character from the file and returns that character as a integer or EOF when it reaches the end of the file. The integer returned can easily type cast into a character variable for your use.The getc function acts essentially identically to fgetc, but is a macro that expands in-line.