Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

i need an explaination for fflush(stdin) what does it flush out? why does this happen

OpenStudy (anonymous):

fflush(stdin) vs gets look into here http://c-faq.com/stdio/gets_flush2.html http://www.gidnetwork.com/b-57.html

OpenStudy (anonymous):

fflush flushes everything from the buffer, in this case for stdin. so if you have read some data but there is more buffered still it will clear it.

OpenStudy (anonymous):

but if it is used only when we use int and char simultaneously but when we use int and float do we use it?i dont think so...

OpenStudy (anonymous):

fflish(stdin) =>clears the input buffer and it doesn't know it is int,char,float,double.It just flushes buffer.

OpenStudy (anonymous):

my point is that we regularly use fflush(stdin) when we want to read int and char simultaneously but when we read int and float we don use it y??

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!