Compilation of c

10
Compilation of C/C++ program By: Er. Aman Kumar

Transcript of Compilation of c

Page 1: Compilation of c

Compilation of C/C++ program By: Er. Aman Kumar

Page 2: Compilation of c

• It envolves following steps : – Creation of program– Compilation program– Linking with another modules from C library– loading program into computer memory

Page 3: Compilation of c
Page 4: Compilation of c

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.

Page 5: Compilation of c

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.

Page 6: Compilation of c

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.

Page 7: Compilation of c

Loading of Program

• Loader simply loads the linked object file into memory for execution

Page 8: Compilation of c
Page 9: Compilation of c

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

Page 10: Compilation of c

www.facebook.com/way2itech

Like, Subscribe & ShareDo comment, if you have any doubt!