Home > Article > Backend Development > What files are generated after the c program is compiled?
What files are generated after a c program is compiled?
The compiler converts the C program source code into binary in four steps: preprocessing and compilation , Assembly, linking
1. Preprocessing: Precompilation actions, such as macros, static members, etc. are processed at this stage; (Unix: .i)
2. Compilation: Generate assembly files, during this process the compiler will optimize the source code; (Unix: .s)
3. Assembly: Generate the assembly file into a target file, which is actually executable (Unix: .o Win: .obj);
4. Link: Link the target file into an executable file (Unix: .out Win: .exe).
Summary: In the C language compilation phase, the compiler will check the syntax, optimize the code, and generate assembly code with the suffix name .s.
For more programming knowledge, please pay attention to PHP Chinese website!
The above is the detailed content of What files are generated after the c program is compiled?. For more information, please follow other related articles on the PHP Chinese website!