Skip to content
Discussion options

You must be logged in to vote

Hi! Yes, this is normal behavior due to standard output buffering. To force the text to display immediately before the scanf execution, you just need to flush the output buffer right after your printf using fflush(stdout);.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Guenonn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussions GitHub Discussions is a collaborative communication feature Question Ask and answer questions about GitHub features and usage Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
2 participants