WHAT IS ACOMPILER? • Translates the entire source code into machine code. • Generates an executable file (.exe). • Execution is fast after compilation. • Example: GCC compiler for C.
WHAT IS ALINKER? • Combines object files and libraries into a final executable. • Resolves external references (e.g., library functions). • Two types: Static linker and Dynamic linker.
6.
TYPES OF LINKERS •Static Linker: Links all modules at compile time • Dynamic Linker: Links during program execution (runtime)
7.
WHAT IS ANINTERPRETER? • Translates and executes code line by line. • Does not produce an independent executable. • Execution is slower compared to compiler. • Example: Python Interpreter.
WHAT IS ALOADER? • Loads the executable file into memory for execution. • Allocates memory and sets program counter. • Part of the operating system.
10.
COMPARISON • Compiler:Translates fullprogram executable. → • Interpreter: Executes line by line no executable. → • Linker: Combines object files + libraries final → program. • Loader: Loads program into memory ready to run. →
11.
CONCLUSION • Compiler:Translates code •Linker: Combines modules • Interpreter: Executes line by line • Loader: Loads program into memory • All four are essential for program execution.