Skip to content
Advertisement

C Language program executable file extention naming convention ( a.out )

Are there good practices or preferred industry standard conventions on how to name (what would be named by default as) a.out files, especially in terms of their extensions?

If it depends on the platform, I’d like to know especially for Linux. Technically I won’t even need an extension, and most modern shell helps identify executable files by green color, nevertheless people would add .sh for bash shell scripts like scriptName.sh.


Example: I think the extention .exe adds value here rather than having no extention. But will this freak out Linux users? Perhaps .out is better? But will it be intuitive for non-C-programmers?

-rw-r--r-- 1 john john    46 Oct  9 15:18 coolProgram.h
-rw-r--r-- 1 john john    80 Oct  9 15:20 coolProgram.c
-rwxr-xr-x 1 john john 16576 Oct  9 15:28 coolProgram.exe
-rw-r--r-- 1 john john  1464 Oct  9 15:21 coolProgram.o

Advertisement

Answer

Adding an extension will most likely have the opposite effect of what you want. The general expectation is that an executable has no extension (a.out being the obvious exception) and, if it does, especially if it’s .exe, users are likely to have learnt to ignore it.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement