Knowee
Questions
Features
Study Tools

compiler and interpreter

Question

compiler and interpreter

🧐 Not the exact question you are looking for?Go ask a question

Solution

It seems like you didn't ask a specific question. However, I can explain the difference between a compiler and an interpreter, which seems to be the topic you're interested in.

A compiler and an interpreter both are used to translate high-level programming language's codes into machine codes. But the difference lies in the way they do this translation.

  1. Compiler: A compiler takes the entire program and translates it into object code which is typically stored in a file. The object code is also referred to as binary code and can be directly executed by the machine after linking. Examples of compiled programming languages are C and C++.

  2. Interpreter: An interpreter directly executes instructions written in a programming or scripting language without previously converting them to an object code or machine code. Examples of interpreted languages are Python, Ruby, and PHP.

So, the key difference is that a compiler scans the entire program and translates it as a whole into machine code. An interpreter, on the other hand, translates program one statement at a time. An interpreter continues translating the program until the first error is met, in which case it stops. But a compiler keeps on compiling the code even after an error is detected and shows all errors of the program at a time.

This problem has been solved

Similar Questions

Write any 5 difference between compiler and interpreter.

Differentiate between compiler,interpreter and assembler

You're an university student pursuing Computer Science.Differentiate between compiler and interpreter.give 7 points including examples and show in a tabular form.

Describe two advantages of an interpreter overa compiler.

Compilers generally produce faster-running programs compared to interpreters.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.