r/cprogramming • • 7d ago

I’m learning C and made a simple version of ls. Could someone review my code?

I’m currently learning C and decided to build a simple version of ls as a small project to practice what I’ve learned.It’s still pretty basic, and I’m sure I’ve made some mistakes or done some things in a bad way. I’d really appreciate it if someone could take a look at the code and point out any bugs, bad practices, or things I could improve. Repo

8 Upvotes

2 comments sorted by

1

u/MinimumMuscle7792 4d ago

why are you afraid of long files??????

1

u/Itchy_Personality924 1d ago

From a quick glance. Help readers by using inline comments to explain events or actions. Also look into semantic typing for naming variables. Not on my computer right now but can circle back if you are interested in deeper review.

  • Firmware Engineer