SlideShare a Scribd company logo
Compiling and
linking of a c
codeBY
Y.SAI SRUTHI,
15471A0495
3 basic steps in creating an
executable form of a c code
 Writing the c code.
 Compiling the c code.
 Linking the c code with corresponding function.
Writing a c code
 The program which we wrote on an editor is known as
source code(high level language code).
 This has an extension .c
 This will be given to compiler before executing.
compiling
 In this section an object code(machine level code)
gets generated.
 The object code is independent of errors.
 Soo the compiler identifies the errors and sends error
messages.
 The object code has an extension of .obj
Linking
 The object code can’t directly gives results.
 The linker establishes the connectivity between the
library functions and the program.
 And fetches those into a file and it takes name what
we have given.
 It has an extension .exe(windows operating system).
 It has an extension a.out(linx or unix).
 This generates a code executable code.
 Let us take a program named sum.
 Sum.c-source code,
 Sum.obj-object code,
 Sum.exe-executable code.
Thank you

More Related Content

What's hot (17)

Basic concepts of python
Basic concepts of pythonBasic concepts of python
Basic concepts of python
deepalishinkar1
 
My first program in c, hello world !
My first program in c, hello world !My first program in c, hello world !
My first program in c, hello world !
Rumman Ansari
 
New features in C# 6
New features in C# 6New features in C# 6
New features in C# 6
Software Associates
 
EK127S15HW2
EK127S15HW2EK127S15HW2
EK127S15HW2
Raaid Arshad
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
Vaibhav Khanna
 
JavaScript Full-Stack Development Course Session 01
JavaScript Full-Stack Development Course Session 01JavaScript Full-Stack Development Course Session 01
JavaScript Full-Stack Development Course Session 01
Basir Jafarzadeh
 
Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6
solutionjug4
 
Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6
helpido9
 
OOP Programs
OOP ProgramsOOP Programs
OOP Programs
hirrahAzhar
 
Common Programming Errors
Common Programming ErrorsCommon Programming Errors
Common Programming Errors
Nicole Ynne Estabillo
 
practice problems on functions IN SWIFT
practice problems on functions IN SWIFTpractice problems on functions IN SWIFT
practice problems on functions IN SWIFT
LOVELY PROFESSIONAL UNIVERSITY
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functions
noahjamessss
 
Toy Interpreter
Toy InterpreterToy Interpreter
Toy Interpreter
Dhrumil Panchal
 
2. Write a programto prompt the user to enter 2 integer values. I...
2.             Write a programto prompt the user to enter 2 integer values. I...2.             Write a programto prompt the user to enter 2 integer values. I...
2. Write a programto prompt the user to enter 2 integer values. I...
hwbloom15
 
API Testing: Answers to Your Top 3 Questions
API Testing: Answers to Your Top 3 QuestionsAPI Testing: Answers to Your Top 3 Questions
API Testing: Answers to Your Top 3 Questions
QASource
 
How to tdd your mvp
How to tdd your mvpHow to tdd your mvp
How to tdd your mvp
The Software House
 
R vectors
R   vectorsR   vectors
R vectors
Learnbay Datascience
 
Basic concepts of python
Basic concepts of pythonBasic concepts of python
Basic concepts of python
deepalishinkar1
 
My first program in c, hello world !
My first program in c, hello world !My first program in c, hello world !
My first program in c, hello world !
Rumman Ansari
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
Vaibhav Khanna
 
JavaScript Full-Stack Development Course Session 01
JavaScript Full-Stack Development Course Session 01JavaScript Full-Stack Development Course Session 01
JavaScript Full-Stack Development Course Session 01
Basir Jafarzadeh
 
Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6
solutionjug4
 
Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6Cis 355 i lab 6 of 6
Cis 355 i lab 6 of 6
helpido9
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functions
noahjamessss
 
2. Write a programto prompt the user to enter 2 integer values. I...
2.             Write a programto prompt the user to enter 2 integer values. I...2.             Write a programto prompt the user to enter 2 integer values. I...
2. Write a programto prompt the user to enter 2 integer values. I...
hwbloom15
 
API Testing: Answers to Your Top 3 Questions
API Testing: Answers to Your Top 3 QuestionsAPI Testing: Answers to Your Top 3 Questions
API Testing: Answers to Your Top 3 Questions
QASource
 

Similar to Compiling and linking of a c code (20)

Programming in C++
Programming in C++Programming in C++
Programming in C++
Lindsey Anderson
 
CS8251_QB_answers.pdf
CS8251_QB_answers.pdfCS8251_QB_answers.pdf
CS8251_QB_answers.pdf
vino108206
 
Basics Of C++.pptx
Basics Of C++.pptxBasics Of C++.pptx
Basics Of C++.pptx
DineshDhuri4
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
Indira Gnadhi National Open University (IGNOU)
 
C class basic programming 1 PPT mayanka (1).pdf
C class basic programming 1 PPT mayanka (1).pdfC class basic programming 1 PPT mayanka (1).pdf
C class basic programming 1 PPT mayanka (1).pdf
mayankamandal
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic concepts
ssuserf86fba
 
Source vs object code
Source vs object codeSource vs object code
Source vs object code
Sana Ullah
 
fundamental of c++ for students of b.tech iii rd year student
fundamental of c++ for students of b.tech iii rd year studentfundamental of c++ for students of b.tech iii rd year student
fundamental of c++ for students of b.tech iii rd year student
Somesh Kumar
 
C# tutorial
C# tutorialC# tutorial
C# tutorial
sarangowtham_gunnam
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse students
Abdur Rahim
 
Chapter 13.1.4
Chapter 13.1.4Chapter 13.1.4
Chapter 13.1.4
patcha535
 
Parallel programming c++ win10 msmpi visual studio
Parallel programming c++ win10 msmpi visual studioParallel programming c++ win10 msmpi visual studio
Parallel programming c++ win10 msmpi visual studio
praveench1888
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
farishah
 
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
 
2621008 - C++ 1
2621008 -  C++ 12621008 -  C++ 1
2621008 - C++ 1
S.Ali Sadegh Zadeh
 
An introduction to programming
An introduction to programmingAn introduction to programming
An introduction to programming
rprajat007
 
computer ppt group22222222222222222222 (1).pptx
computer ppt group22222222222222222222 (1).pptxcomputer ppt group22222222222222222222 (1).pptx
computer ppt group22222222222222222222 (1).pptx
JoyLedda3
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
Subramanyambharathis
 
A basic introduction to compiler design.ppt
A basic introduction to compiler design.pptA basic introduction to compiler design.ppt
A basic introduction to compiler design.ppt
pandaashirbad9
 
CS8251_QB_answers.pdf
CS8251_QB_answers.pdfCS8251_QB_answers.pdf
CS8251_QB_answers.pdf
vino108206
 
Basics Of C++.pptx
Basics Of C++.pptxBasics Of C++.pptx
Basics Of C++.pptx
DineshDhuri4
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
C class basic programming 1 PPT mayanka (1).pdf
C class basic programming 1 PPT mayanka (1).pdfC class basic programming 1 PPT mayanka (1).pdf
C class basic programming 1 PPT mayanka (1).pdf
mayankamandal
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic concepts
ssuserf86fba
 
Source vs object code
Source vs object codeSource vs object code
Source vs object code
Sana Ullah
 
fundamental of c++ for students of b.tech iii rd year student
fundamental of c++ for students of b.tech iii rd year studentfundamental of c++ for students of b.tech iii rd year student
fundamental of c++ for students of b.tech iii rd year student
Somesh Kumar
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse students
Abdur Rahim
 
Chapter 13.1.4
Chapter 13.1.4Chapter 13.1.4
Chapter 13.1.4
patcha535
 
Parallel programming c++ win10 msmpi visual studio
Parallel programming c++ win10 msmpi visual studioParallel programming c++ win10 msmpi visual studio
Parallel programming c++ win10 msmpi visual studio
praveench1888
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
farishah
 
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
 
An introduction to programming
An introduction to programmingAn introduction to programming
An introduction to programming
rprajat007
 
computer ppt group22222222222222222222 (1).pptx
computer ppt group22222222222222222222 (1).pptxcomputer ppt group22222222222222222222 (1).pptx
computer ppt group22222222222222222222 (1).pptx
JoyLedda3
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
Subramanyambharathis
 
A basic introduction to compiler design.ppt
A basic introduction to compiler design.pptA basic introduction to compiler design.ppt
A basic introduction to compiler design.ppt
pandaashirbad9
 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control
 
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
ijflsjournal087
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdfSmart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
PawachMetharattanara
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation RateModeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Journal of Soft Computing in Civil Engineering
 
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
ijflsjournal087
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdfSmart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
PawachMetharattanara
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 

Compiling and linking of a c code

  • 1. Compiling and linking of a c codeBY Y.SAI SRUTHI, 15471A0495
  • 2. 3 basic steps in creating an executable form of a c code  Writing the c code.  Compiling the c code.  Linking the c code with corresponding function.
  • 3. Writing a c code  The program which we wrote on an editor is known as source code(high level language code).  This has an extension .c  This will be given to compiler before executing.
  • 4. compiling  In this section an object code(machine level code) gets generated.  The object code is independent of errors.  Soo the compiler identifies the errors and sends error messages.  The object code has an extension of .obj
  • 5. Linking  The object code can’t directly gives results.  The linker establishes the connectivity between the library functions and the program.  And fetches those into a file and it takes name what we have given.  It has an extension .exe(windows operating system).  It has an extension a.out(linx or unix).  This generates a code executable code.
  • 6.  Let us take a program named sum.  Sum.c-source code,  Sum.obj-object code,  Sum.exe-executable code.
  翻译: