From 37640a0c84558882d2a74847d8f9551c60fe5a8d Mon Sep 17 00:00:00 2001 From: dvorakmortonxd Date: Mon, 25 May 2026 13:14:47 +0200 Subject: [PATCH] fixes a "bug" with the buffer thing.. --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 03ce4df..2ecec31 100644 --- a/main.c +++ b/main.c @@ -125,6 +125,7 @@ int main() { printf("\n\nINPUT BELOW:\n"); // DIVIDER char fruit[20]; //MAX 20 CHARACTERS printf("Pick a fruit: "); + fflush(stdout); // this forces the buffer to print NOW, fixing the "bug" in which it prints out everything AFTER the next line (scanf) scanf("%s", fruit); printf("\nYou choose %s as your fruit!", fruit);