Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does it matter what I name a C file?

Tags:

c

In Java, it is required by the compiler to name your files <Classname>.java. In C, does it matter what the file name is?

like image 361
joshreesjones Avatar asked Aug 23 '13 16:08

joshreesjones


1 Answers

No, the source files can in principle be called anything. However, the name should reflect the contents of the file for readability. Header files also don't have to be called the same as the corresponding source files; they just should.

like image 192
Aasmund Eldhuset Avatar answered Oct 12 '22 20:10

Aasmund Eldhuset