- 2074 Chaitra · 2 marks
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 code | Object code |
|---|---|
| Written by the programmer | Generated by the compiler/assembler |
Human readable text (.c, .cpp) | Binary, not readable (.obj, .o) |
| Input to the compiler | Input to the linker |
| Portable to other machines | Specific to one CPU and OS |
| Can be edited directly | Cannot be edited meaningfully |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Algorithm versus pseudo-code · Computer Programming, chapter 2
- do...while versus for/while loops · Computer Programming, chapter 5 · asked 2×
- Variable declaration versus definition · Computer Programming, chapter 3
- Distributed object versus multiprocessor architecture · Software Engineering, chapter 3
- Huffman code for seven-symbol source · Communication Systems, chapter 6
- Image space versus object space methods · Computer Graphics, chapter 7 · asked 9×
- Client-server versus distributed object architecture · Software Engineering, chapter 3