Friday, February 15, 2013

Ques-1:What is the of definition of Source code & Object code?

The ques-1 solution is given below.

Answer:

Source code:  Source  code is the human readable instructions that a programmer writes.Here is an example of C source code.


void main()
{
   float  radius, area;
   printf( "  radius=? " );
   scanf( " %f " ,&radius );
   area=3.1416*radius*radius;
   printf( " The area of the circle is=%f ",area);
}




Object code:  Object code is name of the instructions that a CPU can read and execute directly.It is also called Machine code.


Thursday, February 14, 2013

Ques-6: What is a Compiler & Interpreter?

The ques-6 solution is given below.


Answer:

Compiler:  A  compiler is a computer program that transforms human readable source code into a machine readable code that a CPU can execute.

The act of transforming source code into machine code is called  " Compilation".





Interpreter:  An interpreter is a computer program that takes a line of code, translates and executes it into machine code and then goes on to the next line.


The act of transforming source code line by line into machine code is called " Interpretation".

Ques-2:What is the difference between Source program & Object program?.

The ques-2 solution is given below.

Answer:   

Source program and Object program are two types of programs found in computer programming.The difference between Source program & Object program is given by below.



Source program:



  1. Source program is typically a program which is human readable instructions written by a programmer.
  2. Source program is written in higher level languages such as Java or C.
  3. Source program are easily readable by humans.


Object program: 
       
  
  1.  Object program is typically a machine executable program created by compiling a source program. 
  2. Object programs usually contain lower level languages such as Assemly language or machine code.
  3. Object programs aren't easily readable by humans.