Translators And Debuging Proccess:

                               


C Language Translators and debuging process



Translators:


      A computer can only understand programs defined using machine code. Consequently a program written for example in a high level language such as Java cannot be run directly. To execute a computer program written in high or low level language, it must be first be translated.

The conversion of source code into machine code is done by the translators. There are three types of translators which converts source code into machine code.

Compiler:
                        A Compiler is a program that translates a high level language into machine code.
The Turbo Pascal compiler, for example, translates a program written in Pascal into machine code that can be run on a PC.


Advantages Of Compiler:

1.      Fast in execution.
2.      The object/executable code produced by a compiler can be distributed or executed without having to have the compiler present.
3.      The object program can be used whenever required without the need to of recompilation.

Assembler:

                    An Assembler converts an assembly program into machine code.


Interpreter:
                     An Interpreter is also a program that translates high-level source code into executable code. However the difference between a compiler and an interpreter is that an interpreter translates one line at a time and then executes it: no object code is produced, and so the program has to be interpreted each time it is to be run. If the program performs a section code 1000 times, then the section is translated into machine code 1000 times since each line is interpreted and then executed.


Debugging Process:
                                                           The process of finding and fixing the bugs or defects in a computer program is called debugging. There are three types of errors which occurs commonly.


Syntax Error:

                       
This error occurs when a programmer write a code which is incorrect or against the rules of written programming language.

Logical Error: 

                        
A mistake in programs’s source code that results in incorrect or unexpected output. This can only be identify by the programmer.

Runtime Error: 

                          
This error occurs due to the lose of information, leakage or memory  and during the executation time when we not perform tasks well.

Post a Comment