wanna know bout scanf()

Status
Not open for further replies.

MoksHa

Right off the assembly line
I have heard many weird things bout fflush() function in c (like undesirable effects).
Can anybody suggest an alternate..
 

blademast3r

In the zone
pls give a clear statement of ur problem...
fflush() is used to erase the keyboard buffer... the syntax is fflush(stdin)
it is used before a getchar() generally if theres a printf statement with a /n character cos the getchar method will take the /n as the input nd move on to the following statements...
 
OP
MoksHa

MoksHa

Right off the assembly line
I read somewhere online about the side effects of using fflush() with input streams,
the reason i have been told is that fflush is used with output streams only.
 

ayush_chh

Ambassador of Buzz
fflush is used to clear buffer both input and output......

fflush(stdin)
stdout
stderr(error o/p device)
stdaux (auxilary device)
stdprn(printer)

that is whal i know....never heard of any problem though......

PS: BTW you could have posted it in Programming section...:)
 
Last edited:
Status
Not open for further replies.
Top Bottom