Is there a standard way of naming source code files in C?
E.g. Should they be underscore separated, capitalized, camel case?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no mandatory convention. In part, it depends on whether your system has a case-sensitive or case-insensitive file names.
The
.csuffix (lower-case) is essentially universal for source files, and the.hfor header files. Other files included in source files may have different extensions, or no extension at all.Classically, the names were all lower-case (look at the standard header names, for example). The names avoid accented characters, spaces and many other punctuation characters, usually adhering to the portable filename character set (alphanumerics, underscore, dash, dot). Other than that, the choice is largely up to you.