Difference b/w compiler and interpreter?

I have the following question as that below
Please define the difference between the compiler and interpreter and also define its advantages and disadvantages?
Thanking you in anticipation.


  • Compiler:
    Takes input of high level language and gives low level language as output u can say machine level output.
    Interpretor: It is same as compiler but it takes argument line by line and compiler takes whole program at once.

  • This post has been deleted.
  • Compilers translate the source into another language, usually machine code, and then the source can be thrown away. This is sometimes an advantage, if you don't want the end user to have access to the source. Other times it is a disadvantage, and source and executable have to be kept in synch, which can be difficult.

    Compiled languages generally execute faster than interpreted ones. This used to be a major advantage, but is less now, because modern computers are so fast that the overhead of interpretation is often not significant.

    An interpreter is easier to implement than a compiler. For an example interpreter, see my book MiniBasic, how to write a script interpreter.

    Read my books
    [link=http://www.lulu.com/bgy1mm] MiniBasic how to write a script interpreter [/link]
    [link=http://www.lulu.com/bgy1mm] Basic Algorithms (in C) [/link]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!