Hacker News new | ask | show | jobs
Ask HN: Which C style do you use?
3 points by crocarneiro 1874 days ago
Just for statistics, which C coding style do you use and why (if there is a reason other than just personal preference)? The Indian Hill Style (https://archive.org/details/indian-hill-c-style), the Linux Kernel Style (https://www.kernel.org/doc/html/latest/process/coding-style.html), other, your own style?
2 comments

My preference is Allman https://en.wikipedia.org/wiki/Indentation_style#Allman_style

But I tend to use K&R or what ever the project I'm working on uses as no-one else uses Allman

Yes, Allman is the correct choice. With indents being 4 spaces and no tab characters.