• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/5

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

5 Cards in this Set

  • Front
  • Back
What is the sequence of stages of compilation?
Source code
Pre-processing > pre-processed source code
Compiler > object code
Linker > executable code
What happens in the pre processing stage?
Go through the code and execute any pre-processor directive that it comes across. eg: all begin with a # #include <iostream>
contents of the header file are placed at the line on which the include statement is made.
code is then written back to disk. Temp file used which is deleted at end of compilation process
What happens in the compiler stage?
Converts code to object code.
Syntax checked, warnings and errors generated.
Standard libraries supplied
Each cpp file compiled to its own object code file,
Each cpp file will have a single file.
What is separate compilation?
Each file is compiled separately into its own object code.
Speed- large programs can take hours to compile
Debugging- componants are tested+compiled seperately
Libraries- pre compiled object code of useful functions+ classes which can be quickly linked in
What happens in the linker stage?
Object code files combined together to form a single self-contained executable file.
Error checking linker errors produce messages
compiler records the promise that a function exists and records its signature(name, datatype of arguments return type)
Attempts to attach the compiled function to the relevant calls in the code