All,

I guess my question is more easily asked through an example. If I have code that makes a call to puts and then a call to getchar, what mechanism enforces that stdout gets flushed before blocking for stdin? Is there a such a mechanism? My gut says yes but I haven't been able to pinpoint it. 

Thanks,
Max