Wednesday, February 27, 2013

Ques-7: What is the difference between compiler and interpreter?

The ques-7 solution is given below.

Solution:

Compiler:

1. Compiler translates a whole program from source code to object code if any wrong is not  found in the      code or program.
2. Compiler catches all wrong of a program together.
3. Lower execution time.
4. Requires higher program development effort and time.
5. It is more popular.
6. Compiler is used in PASCAL,C,C++  etc


Interpreter:

1. Interpreter translates and immediately executes each line of the program.
2. Interpreter catches the all wrong of a line together.
3. Higher execution time.
4. Requires less development effort and time.
5. It is less popular.
6. Interpreter is used in BASIC, DBASE,JAVA etc..

Tuesday, February 26, 2013

Ques-5: What is an Assembler? What is the difference between an Assembler and a Compiler?

The ques-5 solution is given below.

Answer:

Assembler: Assembler is a software or a tool that translates Assembly language into machine code.


The difference between an Assembler and a Compiler is given below.

Assembler:

1. Assembler is a computer program that reads code written in one language which is called Assembly language and translates into machine language.
2. Assembler is used in low-level Assembly language.
3. Assembler is less popular than compiler.


Compiler:

1. Compiler is a computer program that reads code (like C,C++ code )and translates into machine language.
2.  Compiler is used in high-level language.
3. Compiler is more popular than Assembler.