FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

PROGRAMMING LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
which two statements are true of an interpreter?
A
the translation is done once only and as a separate process
B
when an error is found this is reported and it stops. It pinpoints the error so the programmer knows where it has occurred
C
the program can be easily edited as it always exists as source code
D
the program that is run is already translated into machine code so it can be executed more rapidly
Explanation: 

Detailed explanation-1: -Interpreters usually take less amount of time to analyze the source code. However, the overall execution time is comparatively slower than compilers. Compilers usually take a large amount of time to analyze the source code. However, the overall execution time is comparatively faster than interpreters.

Detailed explanation-2: -A Compiler takes a program as a whole. An Interpreter takes single lines of a code. The Compilers generate intermediate machine codes. The Interpreters never generate any intermediate machine codes.

Detailed explanation-3: -Interpreter translates just one statement of the program at a time into machine code. Compiler scans the entire program and translates the whole of it into machine code at once. An interpreter takes very less time to analyze the source code. However, the overall time to execute the process is much slower.

Detailed explanation-4: -Both compiler and interpreters do the same job which is converting higher level programming language to machine code. However, a compiler will convert the code into machine code (create an exe) before program run. Interpreters convert code into machine code when the program is run.

There is 1 question to complete.