Computer Science, asked by sohansaha1517, 6 months ago

write two difference between compiler and interpreter?​

Answers

Answered by programmer89
6

Answer:

Compiler transforms code written in a high-level programming language into the machine code, at once, before program runs, whereas an Interpreter coverts each high-level program statement, one by one, into the machine code, during program run. Compiled code runs faster while interpreted code runs slower.

Answered by expertgenius1st
5

Answer:

Compiler transforms code written in a high-level programming language into the machine code, at once, before program runs, whereas an Interpreter coverts each high-level program statement, one by one, into the machine code, during program run. Compiled code runs faster while interpreted code runs slower. The difference between an interpreted and a compiled language lies in the result of the process of interpreting or compiling. An interpreter produces a result from a program, while a compiler produces a program written in assembly language.

Explanation:

Interpreter -

1. Translates program one statement at a time.

2.It takes less amount of time to analyze the source code but the overall execution time is slower.

3.No intermediate object code is generated, hence are memory efficient.

4.Continues translating the program until the first error is met, in which case it stops. Hence debugging is easy.

5.Programming language like Python, Ruby use interpreters.

compiler-

1.Scans the entire program and translates it as a whole into machine code.

2.It takes large amount of time to analyze the source code but the overall execution time is comparatively faster.

3.Generates intermediate object code which further requires linking, hence requires more memory.

4.It generates the error message only after scanning the whole program. Hence debugging is comparatively hard.

5.Programming language like C, C++ use compilers.

Similar questions