QP School
C coding conventions and style guides - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: C 18 Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=32)
+--- Thread: C coding conventions and style guides (/showthread.php?tid=5113)



C coding conventions and style guides - Qomplainerz - 07-25-2023

Following coding conventions improves code consistency within a project.

// C coding conventions example:
// 1. Use meaningful variable and function names
// 2. Indent code with 4 spaces
// 3. Add comments to explain complex logic
// 4. Declare variables at the beginning of the block
// 5. Use camelCase for variable and function names
// 6. Use UPPER_CASE for constants
// 7. Keep lines under 80 characters