[Courses] C Programming For Absolute Beginners, Lesson 2: Fun With Printf, Scanf, Puts, and Variables

jim jim at well.com
Tue Feb 21 18:50:26 UTC 2012



    For me, I've been frustrated having to take things on 
faith and welcome deep explanations. 
    I like the discussions that develop. I suspect that 
others may also like the discussions, even if they extend 
way beyond what is typically thought right for beginners 
(the idea that it's good to hear the words). 



On Tue, 2012-02-21 at 12:29 -0600, Kathryn Hogg wrote:
> On 2012-02-21 12:26, Christopher Howard wrote:
> > Some discussion should probably be made of buffering issues that can
> > occur while mixing reading and writing on the command-line. I.e., the
> > program might start waiting for the user input before it actually 
> > prints
> > out the line telling the user what to enter. It's been a long time 
> > since
> > I have had to deal with this (normally user input is provided through
> > the program arguments). However, I think it involves flushing
> > stdin/stdout buffers with fflush().
> 
> Reading from stdin (which is what scanf is doing) will cause stdout to 
> be flushed.
> 
> I know I'm not the instructor but lets not confuse the people learning 
> with every little detail.
> 




More information about the Courses mailing list