-moz-user-select:none; -webkit-user-select:none; -khtml-user-select:none; -ms-user-select:none; user-select:none;

Sunday, 15 February 2015

Translators in C++

Translator 

translator is a one that converts the instructions of a high level language program into the instructions of a low level language program.
Just take the example of  ambassadors of different countries.They speak different languages but there is a translator who translate one language to another.In this way,they understand the sayings of each other.
In the same way,a computer cannot understand the instructions of high level language program.So it must be converted into machine language code by a translator so that a computer may understand it easily.
There are normally 3 types of translators in the world of programming:

1. Compiler :-

A compiler converts the instructions of a high level language program into machine code as a whole.It means that it display the errors after compiling the whole program.It is faster in execution than other translators.The disadvantage is that error is not found immediately.

2. Interpreter :-

An interpreter converts the instructions of a high level language program into machine code step by step. It means that it display the errors after compiling each line.The main advantage is that error is found immediately .The main disadvantage is that it is very slow in execution.

3. Assembler :-

An assembler converts the instructions of an assembly language into the instructions of a machine language.

No comments:

Post a Comment