Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 15-04-2008, 04:02 PM   #1 (permalink)
Right Off the Assembly Line
 
MoksHa's Avatar
 
Join Date: Apr 2008
Location: Roorkee
Posts: 5
Default wanna know bout scanf()


I have heard many weird things bout fflush() function in c (like undesirable effects).
Can anybody suggest an alternate..
MoksHa is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 15-04-2008, 05:39 PM   #2 (permalink)
In The Zone
 
blademast3r's Avatar
 
Join Date: Sep 2006
Location: Island of Time
Posts: 414
Default Re: wanna know bout scanf()

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...
blademast3r is offline  
Old 21-04-2008, 01:06 AM   #3 (permalink)
Right Off the Assembly Line
 
MoksHa's Avatar
 
Join Date: Apr 2008
Location: Roorkee
Posts: 5
Default Re: wanna know bout scanf()

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.
MoksHa is offline  
Old 21-04-2008, 09:42 PM   #4 (permalink)
In The Zone
 
ayush_chh's Avatar
 
Join Date: Nov 2005
Location: Bangalore
Posts: 487
Default Re: wanna know bout scanf()

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...
__________________
eXPerience is what a MAN learn's fROM.....

Last edited by ayush_chh; 21-04-2008 at 09:42 PM. Reason: Automerged Doublepost
ayush_chh is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
don't know bout that problem Third Eye Hardware Q&A 7 02-04-2006 10:49 PM
scanf() function ra_rav QnA (read only) 7 26-09-2005 12:50 PM
How bout NTFS to FAT?? detj2004 QnA (read only) 1 28-05-2005 02:24 AM
bout buyin parts from usa CyBorG3132 QnA (read only) 9 23-12-2004 01:09 AM

 
Latest Threads
- by clmlbx
- by tkin

Advertisement




All times are GMT +5.5. The time now is 05:54 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2