complete putc and getc operation