What is a difference between a compiler and an interpreter?

(1 point)
Responses

An interpreter creates an executable file.

An interpreter creates an executable file.

A compiler creates an executable file.

A compiler creates an executable file.

A compiler is source code.

A compiler is source code.

An interpreter is source code.

A key difference between a compiler and an interpreter is the way they handle the source code and produce executable files.

A compiler takes the entire source code as input and translates it into a machine language executable file. The resulting executable file can be directly executed by the computer's hardware without the need for any further interpretation or compilation.

On the other hand, an interpreter reads and executes the source code line by line or statement by statement. It doesn't produce an executable file as output. Instead, it directly interprets and executes the source code without translating it into a machine language beforehand.

So, the correct answer is:

- A compiler creates an executable file.
- An interpreter is source code.