'Spaces at end of printf statements being printed late or trimmed in C with Clion
printf("abc "); on its own prints "abc"
printf("abc ");
printf("d");
prints "abc d"
printf("abc ");
scanf(some char);
printf("d");
prints "abcx d"
I'm using Clion to do this. Other IDEs do not have this issue with me. Other people using the same IDE have not had this issue.
Edit: using printf("abc%s", " ");, as someone suggested, does not change the behaviour at all.
Solution 1:[1]
You do
printf((Any text) \n);
scanf((scanf));
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Saatwik Codz |
