FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

PROGRAMMING LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
which two statements are true of a compiler?
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: -Compiled languages are converted directly into machine code that the processor can execute. As a result, they tend to be faster and more efficient to execute than interpreted languages.

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: -Compiler. Compilers are used to translate a program written in a high-level language into machine code (object code). Once compiled (all in one go), the translated program file can then be directly used by the computer and is independently executable.

There is 1 question to complete.