For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > March 2008 > The bad stdin, bad output









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author The bad stdin, bad output
Ravi

2008-03-28, 7:22 pm

http://pastebin.com/m2f4cb939

In the above code after a single loop of while there is an infinite
loop and the program doesn't waits for the input at scanf().
Please help me know why this is happening.
Ben Bacarisse

2008-03-28, 10:16 pm

Ravi <ra.ravi.rav@gmail.com> writes:

> http://pastebin.com/m2f4cb939
>
> In the above code after a single loop of while there is an infinite
> loop and the program doesn't waits for the input at scanf().
> Please help me know why this is happening.


You need to read questions 12.19 and 12.26a of the C FAQ:
http://c-faq.com/

BTW, posting code is usually preferred to posting a link to code.

--
Ben.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com