Types of C files after its compilation Last Updated : 08 Jul, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report After writing C program when we compile and execute our program, there are various types of files are created. You can refer through Compiling a C program:- Behind the Scenes and How does a C program executes? for better understanding. Below are the points followed when every C file is compiled: Every .h header file pre-compiles with it's corresponding .c file and creates a header object file(.o file).Before compiling our main.c file it first go through the pre-processor, then compiler compiles it into assembler and creates object file (main.o).Then linker link the main.o with required header objects and libraries and creates a executable file (program.exe). Source file(.c): These files contain function definitions, and the entire program logics, these files are human readable and by convention their names end with .c .Header file(.h): These files contain function prototypes and various pre-processor statements. They are used to allow source code files to access externally-defined functions and by convention their names end with .h.Object file(.o): These files are produced as the output of the compiler. They consist of function definitions in binary form, but they are not executable by themselves and by convention their names end with .o.Binary executables file(.exe): These files are produced as the output of a program called a "linker". The linker links together a number of object files to produce a binary file that can be directly executed. It contains symbols that the linker can extract from the archive and insert into an executable as it is being built. And by convention their names end with .exe in windows.Dynamic Library file(.so, .dylib, .dll): A dynamic library (.so files for most POSIX systems, .dylib for OSX and .dll files for Windows) is dynamically linked at runtime by the program. These are also sometimes referred to as shared libraries because one library image can be shared by many programs. Dynamic libraries have the advantage of taking up less disk space if more than one application is using the library. Also, they allow library updates (bug fixes) without having to rebuild executables. And by convention .dll is used for their naming in windows, and .so is used in MacBook and .dylib is used in OSX. Comment More infoAdvertise with us Next Article Commonly Asked C Programming Interview Questions | Set 3 S scorchingeagle Follow Improve Article Tags : C Programs C Language C-programming Programming Basics Similar Reads Types of pragma directives in C Pragma Directives: The pragma directive is used to control the actions of the compiler in a particular portion of a program without affecting the program as a whole. Pragma directives are included in the C program to take effect.The effect of pragma will be applied from the point where it is includ 5 min read Commonly Asked C Programming Interview Questions | Set 3 Q.1 Write down the smallest executable code? Ans. main is necessary for executing the code. Code is C void main() { } Output Q.2 What are entry control and exit control loops? Ans. C support only 2 loops: Entry Control: This loop is categorized in 2 part a. while loop b. for loopExit control: In thi 5 min read Commonly Asked C Programming Interview Questions | Set 3 Q.1 Write down the smallest executable code? Ans. main is necessary for executing the code. Code is C void main() { } Output Q.2 What are entry control and exit control loops? Ans. C support only 2 loops: Entry Control: This loop is categorized in 2 part a. while loop b. for loopExit control: In thi 5 min read How does a C program executes? Whenever a C program file is compiled and executed, the compiler generates some files with the same name as that of the C program file but with different extensions. So, what are these files and how are they created? Below image shows the compilation process with the files created at each step of th 3 min read How does a C program executes? Whenever a C program file is compiled and executed, the compiler generates some files with the same name as that of the C program file but with different extensions. So, what are these files and how are they created? Below image shows the compilation process with the files created at each step of th 3 min read How to Create a Dynamic Library in C? In C, a dynamic library is a library that is loaded at runtime rather than compile time. We can create our own dynamic libraries and use them in our programs. In this article, we will learn how to create a dynamic library in C. Example: Input:Hello, geeksforgeek!Output:Hello, geeksforgeek!Creating a 2 min read Like