* Implement the getc() function