The compiler uses a special convention for the file names, so that we do not confuse their contents. The name of a source program (the code which you write) is āfilename.cā. The compiler generates a file of object code from this called āfilename.oā, as yet unlinked. The final program, when linked to libraries is called āfilenameā on Unix-like operating systems, and āfilename.EXEā on Windows derived systems. The libraries themselves are also files of object code, typically called āliblibraryname.aā or āliblibraryname.soā. Header files are always called ālibname.hā. The endings ādot somethingā (called file extensions) identify the contents of files for the compiler. The dotted endings mean that the compiler can generate an executable file with the same name as the original source ā just a different ending. The quad file and the object file are only working files and should be deleted by the compiler at the end of compilation. The ā.cā
suffix is to tell the compiler that the file contains a C source program and similarly the other letters indicate non-source files in a convenient way. To execute the compiler you type,
cc filename
For example,
cc foo.c