> -----Original Message----- > From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On Behalf > Of naga raj > > I have given the input to the program using HyperTerminal. I have > entered only abc as my input. Your program works fine for me under Linux running in an xterm. I doubt that getchar is at fault here, I suspect that it is to do with HyperTerminal (and therefore probably not relevant to this mailing list anymore). I would suggest running it in a different terminal ie. Windows command prompt and see what happens. Regards, Andrew