Comparison of Compiler and Interpreter

Basis for comparisonCompilerInterpreter
InputIt takes an entire program at a time.
It takes a single line of code or instruction at a time.
OutputIt generates intermediate object code.It does not produce any intermediate object code.
Working mechanism
The compilation is done before execution.Compilation and execution take place simultaneously.
Speed

Comparatively fasterSlower
Memory

Memory requirement is more due to the creation of object code.It requires less memory as it does not create intermediate object code.
Errors
Display all errors after compilation, all at the same time.Displays error of each line one by one.
Error detectionDifficult Easier comparatively
Pertaining Programming languages
C, C++, C#, Scala, typescript uses compiler.PHP, Perl, Python, Ruby uses an interpreter.

Compiler and Interpreter


Example of high level language, low level language and Machine language


Practise To Solve MCQ




MCQ (Module – 1 & 2) : 
 1. Which one of the following statements about safety precautions applicable to power cables is true when using computers?
A. Faulty cables should not be repaired using insulating tape.
B. You should shutdown your PC by unplugging it from the electricity supply.
C. Cables should not be extended across open areas.
D. More than one computer should not use the same power socket.

2. Which one of the following statements best describes the Intranet?
A. A network that is shared between more than one organization
B. A network of computers, accessible to everyone
C. An internal network, using e-mail and Web, within a single organization
D. A world-wide collection of computer files connected by links
 3. The physical components of your computer are referred to as –
A. Software                        B. Operating System
C. Hardware                       D. Casing
 4. Which of the following factors affect the performance of a PC?
A. Multi tasking considerations    B. RAM size
C. Both A and B                                      D. None

Practical Sample Access