Compiling a Program

Computer Science: OCR A Level, topic 2.2.13

Compiling a Program

You need to know the process a piece of code undergoes when it is compiled by a program.

Compiling a program

Compiling a program

  • When code is compiled through a compiler, it has to go through 4 stages before it is ready to run.
Stages of compilation

Stages of compilation

  • Those stages are:
  1. Lexical analysis.
  • Syntax analysis.
  • Code generation.
  • Code optimisation.

Test yourself on Compiling a Program

  • Stages of Compilation

  • What is the first stage of compiling a program?

Practise this topic for free