using getc for read line.