CSS Computer Science (Optional) — Paper-I, Section-A, Topic II subtopic. How source code becomes a running program. See also: Source to Exe File Conversion Process for the full pipeline diagram.
Program Development Life Cycle
- Edit — write/modify source code in an editor or IDE
- Compile/Interpret — translate source code toward machine-executable form
- Link — combine object code with libraries into a complete executable
- Load — the OS loader brings the executable into memory
- Execute — the CPU runs the loaded program
- Debug — locate and fix errors found during testing/execution
- Maintain — update the program over time as requirements change or bugs surface post-release
Compiler
- Translates the entire source code into machine code before execution, producing a standalone executable
- Errors are reported only after the whole program is analyzed/translated (all syntax errors listed together)
- Produces a faster-running final program since translation happens once, ahead of time
- Examples: C, C++, Rust
- Typical compiler phases: lexical analysis (tokenizing) → syntax analysis (parsing, building a parse tree) → semantic analysis (type checking) → intermediate code generation → optimization → code generation (target machine code)
Interpreter
- Translates and executes source code line-by-line (or statement-by-statement) at runtime
- No standalone executable is produced — the source is needed every time the program runs, together with the interpreter
- Errors surface only when execution reaches the faulty line — earlier correct lines may already have run
- Examples: Python, classic BASIC, shell scripts