Computer Science

Source and Object Code

Source Code

A program written in a high-level language is called source code. Source code is also called source program. Computer cannot understand the statements of high-level language. The source code cannot be executed by computer directly. It is converted into object code and then executed.

Object Code

A program in machine language is called object code. It is also called object program or machine code. Computer understands object code directly.

Difference between

The main difference between source code and object code is as follows:

Source Code Object Code
1. Source code is written in high-level or assembly language. 1. Object Code is written in machine language through compiler.
2. Source code is easy to understand. 2. Object Code is difficult to understand.
3. Source code is easy to modify. 3. Object Code is difficult to modify.
4. Source code contains fewer statements than object code. 4. Object Code contains more statements than source code.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button