Reply appended... > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of himanshu kansal > Sent: Friday, May 05, 2006 9:31 AM > To: [email protected] > Subject: Re: [C-Paradise] guys i need your help! > > hi.... i m himanshu... from india > > fflush(stdin); is a stream cleaning function > > when an input is taken, user also presses an ENTER after that. > that ENTER is stored by the compiler in the next bit space as '\r' (the > return carriage character. then if the next input is to b taken... it > skips 1 space in it where already this ENTER is stored. that means, if the > next input is a single character... the compiler skips it, as the place > was already filled by the return carriage.
Wrong! May be that's how your compiler behaved, but that's not what the language defined. The standard does not defined fflush()for input stream. On another compiler, fflush(stdin) might results undefined behavior. Shyan ------------------------ Yahoo! Groups Sponsor --------------------~--> Home is just a click away. Make Yahoo! your home page now. http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/EbFolB/TM --------------------------------------------------------------------~-> >-----------------------------------------~-~> CHECK THE ARCHIVE BEFORE POSTING!!!! Archive is available at http://www.eScribe.com/software/C-Paradise/ >------------------------------------------_-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/C-Paradise/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
