A C program is spread over several source files. Which tool joins the object files into one executable?

The linker, which also pulls in needed libraries.

Start playing free

  1. The compiler
  2. The assembler
  3. The linker ✔

Why: In the usual pipeline, a compiler produces assembly and an assembler produces object files. The linker resolves references among those object files and needed libraries, then combines them into an executable.

Huh, didn't know that: An undefined reference commonly appears during linking when no object file or library supplies a required symbol.

The dad joke
Why did the object files call the linker? They wanted to get it all together.
Like this card?
Play the game

References

Answer: The linker. In the usual pipeline, a compiler produces assembly and an assembler produces object files. The linker resolves references among those object files and needed libraries, then combines them into an executable.

  1. OpenStax Introduction to Computer Science 5.4: Machine-Level Program Representation openstax.org/books/introduction-computer-science/pages/5-4-machine-level-program-representation
    The linker takes all the generated object files, looks for needed libraries, and links everything together into one executable file.
    Checked 2026-10-10.

Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.

Test yourself in the game