Compilation of C/C++
program
By: Er. Aman Kumar
• It envolves following steps :
– Creation of program
– Compilation program
– Linking with another modules from C library
– loading program into computer memory
Creation the program
• First of all, we will create our program. This is
known as source Code.
• Source code is user understandable and it is
not computer understandable.
Compiling the program
• source code is then translated into object
code using compiler. Source code acts as an
input to compiler and object code is output.
Linking of program
• Linker-> is program that combines separately
written modules into one program(file)
• C/c++ has given you some inbuilt
function/classes that will be linked to your
program using linker.
• Linker simply refers to creation of single file
from multiple object files.
Loading of Program
• Loader simply loads the linked object file into
memory for execution
Time taken during these steps
• Compilation Time : Time taken by compiler to
convert source code into object code.
• Run Time : time taken by program for its
execution
Compilation of c

Compilation of c

  • 1.
  • 2.
    • It envolvesfollowing steps : – Creation of program – Compilation program – Linking with another modules from C library – loading program into computer memory
  • 4.
    Creation the program •First of all, we will create our program. This is known as source Code. • Source code is user understandable and it is not computer understandable.
  • 5.
    Compiling the program •source code is then translated into object code using compiler. Source code acts as an input to compiler and object code is output.
  • 6.
    Linking of program •Linker-> is program that combines separately written modules into one program(file) • C/c++ has given you some inbuilt function/classes that will be linked to your program using linker. • Linker simply refers to creation of single file from multiple object files.
  • 7.
    Loading of Program •Loader simply loads the linked object file into memory for execution
  • 9.
    Time taken duringthese steps • Compilation Time : Time taken by compiler to convert source code into object code. • Run Time : time taken by program for its execution