[CLOSED] Odd behaviour of C code running on local compiler (C4Droid 7.00)
Problem details: I'm noticing a change in behaviour of my local C compiler (C4Droid). The change is noticeable when reading input in a loop. In the old days (previous version) I can use printf() to show an input message, followed immediately by a scanf() prompt (in a loop), and the code runs in correct sequence (show the message first and input prompt afterwards). But recently I noticed that I have to flush the output stream to achieve the same result. Without flushing the output stream the scanf() input prompt appears before the message printed by printf(). NOTICES: * This behaviour is noticed on C4Droid v7.00. * I'm not aware how it is like with any other C compiler/IDE. * It doesn't appear to happen when reading input normally (without a loop). * I don't suppose this behaviour is obviously noticeable in SoloLearn Code Playground * I'm not sure what am I doing wrong in the old days, but it used to work fine. https://code.sololearn.com/cyJPLZFsrOr3/?ref=app Any explanation would be appreciated . TIA,