STRUCTURE OF C PROGRAM
1. Documentations section
2. Pre-processor directives
3. Global declaration
4. User defined function declaration
5. Main function {
Local declaration;
Statement 1;
Statement 2;
6. User defined function
COMPILATION PROCESS IN C PROGRAMMING
(in order from top to bottom)
- C Program
- Pre-processor: handles directives for the pre-processor, such as #include and #define
- Expanded source code
- Compiler: Converts the C source code into assembly code
- Assembly code
- Assembler: Translate assembly code into machine code, generating object files
- Object code
- Linker: combines multiple object files and libraries into a single executable file.
- Executable code
- Loader
- Execution