SlideShare a Scribd company logo
COMPILATION AND EXECUTION
INTRODUCTION
 First of all, computers are electronic device know
only one language that is machine language. i.e. it
contains only 0’s and 1’s
 so if you need to instruct a computer you need to
give instructions in binary form that is in the form of
0’s and 1’s.
 For a human it is very difficult to talk in this
language. So we create a software which will
convert our known language ( high level language)
into machine level language. thus computer can
work.
 This software is known as compilers.
COMPILERS
 Compiler is software which converts high level
language(C, C++ into machine level language. And
this process is known as compilation.
 After compilation we get a file known as object file
which is machine language. Object file can be
directly loaded into computer memory and execute
or run that. The process of loading object file and
running that file is known as Execution.
COMPILATION AND EXECUTION
 There are many steps involved in converting a C
program into an executable form, these all steps
are called "build process".
 Build process are representing in the following
graphically diagram :
LETS NOW UNDERSTAND THE STEPS MENTIONED IN
ABOVE FIGURE IN DETAIL.
 Editor-Type your program in editor (source code).
 Pre-processing-During this step, the C source
code is expanded based on the pre-processor
directives like as #include, #ifdef, #define etc. The
expanded source code is stored in an intermediate
file with .i extension.
STEPS DESCRIPTION CONTINUED..
 Compilation- The expanded source code is then
passed to the compiler, which identifies the syntax
error in the expanded source code. If the expanded
source code is error free, then the compiler transfer
the expanded source code in C, into an equivalent
assembly language program. The assembly code is
typically stored in .ASM file. So our first.c file would
be changed and stored in first.ASM.
STEPS DESCRIPTION CONTINUED..
 Assembling - Assembler translate the .ASM
program into Relocatable Object code. Thus
assembler translates our first.asm file into first.OBJ.
.OBJ file is one of the binary file. This object file
contained header and several sections.
STEPS DESCRIPTION CONTINUED..
 Linking - Linking is the final step of build process
i.e. creating an executable program. It's do
following works :
 Find definition of all external function
 Find definition of all global variables
 Combine Data Section
 Combine Code Section
 Loading - Once the .EXE file is created and stored
on the disk, it is ready for execution. When we
execute it, it is first brought from the disk into the
memory (RAM) by an OS component called
Program Loader.
PROGRAM DEBUGGING
 In software development, debugging involves
locating and correcting code errors in a computer
program.
 The debugging process starts as soon as code is
written and continues in successive stages as code
is combined with other units of programming to
form a software product.
 In a large program that has thousands and
thousands of lines of code, the debugging process
can be made easier by using strategies such as
unit tests, code reviews and pair programming.

More Related Content

What's hot

Cp week _1.
Cp week _1.Cp week _1.
Cp week _1.
shahidullah57
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
Cma Mohd
 
Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide share
Sudhaa Ravi
 
Compilation v. interpretation
Compilation v. interpretationCompilation v. interpretation
Compilation v. interpretation
Alexander Bollbach
 
Compiler interpreter and_bootstrapping
Compiler interpreter and_bootstrappingCompiler interpreter and_bootstrapping
Compiler interpreter and_bootstrapping
sandeep manzhi
 
Introduction to compiler interpreter
Introduction to compiler interpreterIntroduction to compiler interpreter
Introduction to compiler interpreter
poojapainter
 
Starting c++
Starting c++Starting c++
Starting c++
Ameer Khan
 
Compliers and interpreters
Compliers and interpretersCompliers and interpreters
Compliers and interpreters
shivasdhtsvmic
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
Chapter 2.3
Chapter 2.3Chapter 2.3
Chapter 2.3
sotlsoc
 
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
Muhammad Hammad Waseem
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
baabtra.com - No. 1 supplier of quality freshers
 
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
Muhammad Hammad Waseem
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
Inamul Hossain Imran
 
Computer Language Translator
Computer Language TranslatorComputer Language Translator
Computer Language Translator
Ranjeet Kumar
 
Interpreted and compiled language
Interpreted and compiled languageInterpreted and compiled language
Interpreted and compiled language
baabtra.com - No. 1 supplier of quality freshers
 
Compiler type
Compiler typeCompiler type
Compiler type
Amrish rajput
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
Md Hossen
 
Language Translator ( Compiler)
Language Translator ( Compiler)Language Translator ( Compiler)
Language Translator ( Compiler)
Nazmul Hyder
 
Computer languages
Computer languagesComputer languages
Computer languages
Prince Arsal
 

What's hot (20)

Cp week _1.
Cp week _1.Cp week _1.
Cp week _1.
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
 
Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide share
 
Compilation v. interpretation
Compilation v. interpretationCompilation v. interpretation
Compilation v. interpretation
 
Compiler interpreter and_bootstrapping
Compiler interpreter and_bootstrappingCompiler interpreter and_bootstrapping
Compiler interpreter and_bootstrapping
 
Introduction to compiler interpreter
Introduction to compiler interpreterIntroduction to compiler interpreter
Introduction to compiler interpreter
 
Starting c++
Starting c++Starting c++
Starting c++
 
Compliers and interpreters
Compliers and interpretersCompliers and interpreters
Compliers and interpreters
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 
Chapter 2.3
Chapter 2.3Chapter 2.3
Chapter 2.3
 
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Computer Language Translator
Computer Language TranslatorComputer Language Translator
Computer Language Translator
 
Interpreted and compiled language
Interpreted and compiled languageInterpreted and compiled language
Interpreted and compiled language
 
Compiler type
Compiler typeCompiler type
Compiler type
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
 
Language Translator ( Compiler)
Language Translator ( Compiler)Language Translator ( Compiler)
Language Translator ( Compiler)
 
Computer languages
Computer languagesComputer languages
Computer languages
 

Similar to Compilation

INTRODUCTION TO C LANGUAGE.pptx
INTRODUCTION TO C LANGUAGE.pptxINTRODUCTION TO C LANGUAGE.pptx
INTRODUCTION TO C LANGUAGE.pptx
MohammedtajuddinTaju
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
Subramanyambharathis
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
Kuntal Bhowmick
 
Introduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariIntroduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem Ansari
Tech
 
C
CC
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
farishah
 
COM1407: Introduction to C Programming
COM1407: Introduction to C Programming COM1407: Introduction to C Programming
COM1407: Introduction to C Programming
Hemantha Kulathilake
 
Unit 1
Unit 1Unit 1
Unit 1
TPLatchoumi
 
C programming first_session
C programming first_sessionC programming first_session
C programming first_session
Keroles karam khalil
 
C programming first_session
C programming first_sessionC programming first_session
C programming first_session
Keroles karam khalil
 
Computer programming tools and building process
Computer programming tools and building processComputer programming tools and building process
Computer programming tools and building process
ArghodeepPaul
 
Language_Processing_System.pptx
Language_Processing_System.pptxLanguage_Processing_System.pptx
Language_Processing_System.pptx
MADHURABHOSE
 
Chapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxChapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptx
dawod yimer
 
Contents Pre-requisites Approximate .docx
   Contents Pre-requisites  Approximate .docx   Contents Pre-requisites  Approximate .docx
Contents Pre-requisites Approximate .docx
ShiraPrater50
 
Programming in c
Programming in cProgramming in c
Programming in c
ankitjain851
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
Ppt 1
Ppt 1Ppt 1
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
Keerty Smile
 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler development
DeepOad
 
Welcome to the .Net
Welcome to the .NetWelcome to the .Net
Welcome to the .Net
Amr Shawky
 

Similar to Compilation (20)

INTRODUCTION TO C LANGUAGE.pptx
INTRODUCTION TO C LANGUAGE.pptxINTRODUCTION TO C LANGUAGE.pptx
INTRODUCTION TO C LANGUAGE.pptx
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
 
Introduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariIntroduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem Ansari
 
C
CC
C
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
 
COM1407: Introduction to C Programming
COM1407: Introduction to C Programming COM1407: Introduction to C Programming
COM1407: Introduction to C Programming
 
Unit 1
Unit 1Unit 1
Unit 1
 
C programming first_session
C programming first_sessionC programming first_session
C programming first_session
 
C programming first_session
C programming first_sessionC programming first_session
C programming first_session
 
Computer programming tools and building process
Computer programming tools and building processComputer programming tools and building process
Computer programming tools and building process
 
Language_Processing_System.pptx
Language_Processing_System.pptxLanguage_Processing_System.pptx
Language_Processing_System.pptx
 
Chapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxChapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptx
 
Contents Pre-requisites Approximate .docx
   Contents Pre-requisites  Approximate .docx   Contents Pre-requisites  Approximate .docx
Contents Pre-requisites Approximate .docx
 
Programming in c
Programming in cProgramming in c
Programming in c
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
Ppt 1
Ppt 1Ppt 1
Ppt 1
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler development
 
Welcome to the .Net
Welcome to the .NetWelcome to the .Net
Welcome to the .Net
 

More from Dr. Rupinder Singh

1.1 communication
1.1 communication1.1 communication
1.1 communication
Dr. Rupinder Singh
 
Lesson 7 io statements
Lesson 7 io statementsLesson 7 io statements
Lesson 7 io statements
Dr. Rupinder Singh
 
Lesson 4
Lesson 4Lesson 4
Lesson 3
Lesson 3Lesson 3
Lesson 2
Lesson 2Lesson 2
Lesson 1
Lesson 1Lesson 1
Data types
Data typesData types
Data types
Dr. Rupinder Singh
 
C Slides
C SlidesC Slides

More from Dr. Rupinder Singh (8)

1.1 communication
1.1 communication1.1 communication
1.1 communication
 
Lesson 7 io statements
Lesson 7 io statementsLesson 7 io statements
Lesson 7 io statements
 
Lesson 4
Lesson 4Lesson 4
Lesson 4
 
Lesson 3
Lesson 3Lesson 3
Lesson 3
 
Lesson 2
Lesson 2Lesson 2
Lesson 2
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
Data types
Data typesData types
Data types
 
C Slides
C SlidesC Slides
C Slides
 

Recently uploaded

S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 

Compilation

  • 2. INTRODUCTION  First of all, computers are electronic device know only one language that is machine language. i.e. it contains only 0’s and 1’s  so if you need to instruct a computer you need to give instructions in binary form that is in the form of 0’s and 1’s.  For a human it is very difficult to talk in this language. So we create a software which will convert our known language ( high level language) into machine level language. thus computer can work.  This software is known as compilers.
  • 3. COMPILERS  Compiler is software which converts high level language(C, C++ into machine level language. And this process is known as compilation.  After compilation we get a file known as object file which is machine language. Object file can be directly loaded into computer memory and execute or run that. The process of loading object file and running that file is known as Execution.
  • 4. COMPILATION AND EXECUTION  There are many steps involved in converting a C program into an executable form, these all steps are called "build process".  Build process are representing in the following graphically diagram :
  • 5.
  • 6. LETS NOW UNDERSTAND THE STEPS MENTIONED IN ABOVE FIGURE IN DETAIL.  Editor-Type your program in editor (source code).  Pre-processing-During this step, the C source code is expanded based on the pre-processor directives like as #include, #ifdef, #define etc. The expanded source code is stored in an intermediate file with .i extension.
  • 7. STEPS DESCRIPTION CONTINUED..  Compilation- The expanded source code is then passed to the compiler, which identifies the syntax error in the expanded source code. If the expanded source code is error free, then the compiler transfer the expanded source code in C, into an equivalent assembly language program. The assembly code is typically stored in .ASM file. So our first.c file would be changed and stored in first.ASM.
  • 8. STEPS DESCRIPTION CONTINUED..  Assembling - Assembler translate the .ASM program into Relocatable Object code. Thus assembler translates our first.asm file into first.OBJ. .OBJ file is one of the binary file. This object file contained header and several sections.
  • 9. STEPS DESCRIPTION CONTINUED..  Linking - Linking is the final step of build process i.e. creating an executable program. It's do following works :  Find definition of all external function  Find definition of all global variables  Combine Data Section  Combine Code Section  Loading - Once the .EXE file is created and stored on the disk, it is ready for execution. When we execute it, it is first brought from the disk into the memory (RAM) by an OS component called Program Loader.
  • 10. PROGRAM DEBUGGING  In software development, debugging involves locating and correcting code errors in a computer program.  The debugging process starts as soon as code is written and continues in successive stages as code is combined with other units of programming to form a software product.  In a large program that has thousands and thousands of lines of code, the debugging process can be made easier by using strategies such as unit tests, code reviews and pair programming.