Thanks spirit...It is reading character by character. But it is not reading end of line character('\n'). How can we modify the code so that we can read end of line character also..Thanking you again...