0% found this document useful (0 votes)
2 views1 page

C Program Structure and Compilation Process

Uploaded by

Duy Tan Bi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

C Program Structure and Compilation Process

Uploaded by

Duy Tan Bi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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

You might also like