Skip to main content

Source code versus object code

Short answer

Source code is the human-readable program written by a programmer in a high-level or assembly language. Object code is the machine-language binary output generated by a compiler or assembler, which is not human-readable and is specific to one CPU and OS.

What is the difference between source code and object code?

Source code is the program written by the programmer in a high-level or assembly language. Object code is the machine-language output produced when the compiler translates the source code.

Source codeObject code
Written by the programmerGenerated by the compiler/assembler
Human readable text (.c, .cpp)Binary, not readable (.obj, .o)
Input to the compilerInput to the linker
Portable to other machinesSpecific to one CPU and OS
Can be edited directlyCannot be edited meaningfully

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Programming chapter 1 questions →