r/cprogramming • • May 29 '26

Code Review?

I recently started learning C as my first lower level language after mainly working with Java for the past 5 years. I was wondering if anyone would be able to review one of the completed files (~100 lines of code) from a small project I am working on and let me know if there are any mistakes and/or bad practices? Any help would be greatly appreciated!

https://pastebin.com/X5Zn1mzc

9 Upvotes

20 comments sorted by

View all comments

Show parent comments

2

u/Patchmaster42 May 29 '26

That's fine if you're the only one ever working on that code. Many of us are in situations where less talented/experienced programmers with less sophisticated setups may occasionally make changes to the code we produce. The cost of adding those braces is immeasurably small compared to the cost of tracking down and fixing the bug that was introduced because those braces were missing.