Computer Science, asked by rohityadavnauli123, 11 months ago

different between complier and interpreter​

Answers

Answered by palaklalwani704
8

Answer:

A compiler is a translator which transforms source language (high-level language) into object language (machine language). In contrast with a compiler, an interpreter is a program which imitates the execution of programs written in a source language.

Answered by negiji80061
2

Answer:

Differences Between Compiler and Interpreter

Let’s look at major differences between Compiler and Interpreter.

The compiler takes a program as a whole and translates it, but interpreter translates a program statement by statement.

Intermediate code or target code is generated in case of a compiler. As against interpreter doesn’t create intermediate code.

A compiler is comparatively faster than Interpreter as the compiler take the whole program at one go whereas interpreters compile each line of code after the other.

The compiler requires more memory than interpreter because of the generation of object code.

Compiler presents all errors concurrently, and it’s difficult to detect the errors in contrast interpreter display errors of each statement one by one, and it’s easier to detect errors.

In compiler when an error occurs in the program, it stops its translation and after removing error whole program is translated again. On the contrary, when an error takes place in the interpreter, it prevents its translation and after removing the error, translation resumes.

In a compiler, the process requires two steps in which firstly source code is translated to target program then executed. While in Interpreter It’s a one-step process in which Source code is compiled and executed at the same time.

The compiler is used in programming languages like C, C++, C#, Scala, etc. On the other Interpreter is employed in languages like PHP, Ruby, Python, etc.

Similar questions