information about computer technology and about computer languages.

Thursday, 12 November 2020

what is source & object code?

What is Source & Object Code?             


The statements written by the programmer are called source code and the file they are saved in is called the source file. 
Source code is a high level language. Source code is not system specific. it contains less number of statement then object code. Source code is directly understandable by machine.

After the source code is saved to a file, the process of translating it to machine language can begin. During the first phase of this process, a program called the preprocessor reads the source code. The preprocessor searches for special lines that begin with # symbol. These lines contain commands that cause the preprocessor to modify the source in some way. During the next phase the compiler steps through the preprocessor source code, translating each source code instruction into the appropriate machine language instruction. This process will uncover any syntax errors, that may be in the program. Syntax errors are illegal uses of key words, operators, punctuation, and other language elements. if the program is free of syntax errors, the compiler stores the translated machine language instructions, which are called object code, is an object file. 

The object code file contains sequence of machine readable instructions that is processed by CPU in computer. Application software is usually in the form of compiled object code. Object code is a level code. Object code is a system specific. it contains more number of statement then source code. Object code is not directly understandable by machine.








2 comments: