SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Explain the motivation behind using a header file for a C program.
Solution
A header file is a file containing C declarations and macro definitions to be shared between
several source files.
Header files purpose:
System header files declare the interfaces to parts of the operating system.
these will provide the definitions and declarations you need to invoke system calls and libraries.
Your own header files contain declarations for interfaces between the source files of your
program. Each time you have a group of related declarations and macro definitions all or most of
which are needed in several different source files, it is a good idea to create a header file for
them.
Including a header file is equal to copying the content of the header file

Weitere ähnliche Inhalte

Mehr von rtodd432

Mehr von rtodd432 (20)

Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docxExplain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
Explain the reasons why chloride ions (Cl-) is detrimental to corrosio.docx
 
Explain the purpose of a data member-SolutionAnswer Data Member It is.docx
Explain the purpose of a data member-SolutionAnswer Data Member It is.docxExplain the purpose of a data member-SolutionAnswer Data Member It is.docx
Explain the purpose of a data member-SolutionAnswer Data Member It is.docx
 
Explain the function of the following methods in LinkedList 1- addFirs.docx
Explain the function of the following methods in LinkedList 1- addFirs.docxExplain the function of the following methods in LinkedList 1- addFirs.docx
Explain the function of the following methods in LinkedList 1- addFirs.docx
 
Explain the effect doping towards an intrinsic silicon- Give one examp.docx
Explain the effect doping towards an intrinsic silicon- Give one examp.docxExplain the effect doping towards an intrinsic silicon- Give one examp.docx
Explain the effect doping towards an intrinsic silicon- Give one examp.docx
 
Explain the difference between private and proctected members of a cla.docx
Explain the difference between private and proctected members of a cla.docxExplain the difference between private and proctected members of a cla.docx
Explain the difference between private and proctected members of a cla.docx
 
Explain how goverment deficit lead to increases in the money supply-.docx
Explain how goverment deficit lead to increases in the money supply-.docxExplain how goverment deficit lead to increases in the money supply-.docx
Explain how goverment deficit lead to increases in the money supply-.docx
 
Explain how doping Si allows you to transport charges in a detector-So.docx
Explain how doping Si allows you to transport charges in a detector-So.docxExplain how doping Si allows you to transport charges in a detector-So.docx
Explain how doping Si allows you to transport charges in a detector-So.docx
 
Explain how an --interest group-- (or --special interest group--) may.docx
Explain how an --interest group-- (or --special interest group--) may.docxExplain how an --interest group-- (or --special interest group--) may.docx
Explain how an --interest group-- (or --special interest group--) may.docx
 
Explain how stock price volatility is more likely to imply risk than e.docx
Explain how stock price volatility is more likely to imply risk than e.docxExplain how stock price volatility is more likely to imply risk than e.docx
Explain how stock price volatility is more likely to imply risk than e.docx
 
Explain the concept entropy Explain the concept entropySolutionAnswe.docx
Explain the concept entropy   Explain the concept entropySolutionAnswe.docxExplain the concept entropy   Explain the concept entropySolutionAnswe.docx
Explain the concept entropy Explain the concept entropySolutionAnswe.docx
 
Explain how would you determine a covalent bond compounds bond using L.docx
Explain how would you determine a covalent bond compounds bond using L.docxExplain how would you determine a covalent bond compounds bond using L.docx
Explain how would you determine a covalent bond compounds bond using L.docx
 
Expansive (swelling) clays exist in various areas across North America.docx
Expansive (swelling) clays exist in various areas across North America.docxExpansive (swelling) clays exist in various areas across North America.docx
Expansive (swelling) clays exist in various areas across North America.docx
 
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docxFInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
FInd and invertible matrix U so that UR - R is in Reduced Row echelon.docx
 
Financial intermediaries play a crucial role in an economic crisisthey.docx
Financial intermediaries play a crucial role in an economic crisisthey.docxFinancial intermediaries play a crucial role in an economic crisisthey.docx
Financial intermediaries play a crucial role in an economic crisisthey.docx
 
Financial Institutions Describe each of the following financial instit.docx
Financial Institutions Describe each of the following financial instit.docxFinancial Institutions Describe each of the following financial instit.docx
Financial Institutions Describe each of the following financial instit.docx
 
Financial ratio analysis is conducted by managers- equity investors- l.docx
Financial ratio analysis is conducted by managers- equity investors- l.docxFinancial ratio analysis is conducted by managers- equity investors- l.docx
Financial ratio analysis is conducted by managers- equity investors- l.docx
 
Files are logical units of information created by processes- A disk ma.docx
Files are logical units of information created by processes- A disk ma.docxFiles are logical units of information created by processes- A disk ma.docx
Files are logical units of information created by processes- A disk ma.docx
 
Fill in the blank Accurate determination of abundances of isotopes bec.docx
Fill in the blank Accurate determination of abundances of isotopes bec.docxFill in the blank Accurate determination of abundances of isotopes bec.docx
Fill in the blank Accurate determination of abundances of isotopes bec.docx
 
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docxExercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
Exercise 16-16 On January 1- 2012- Chang Corp- had 564-000 shares of c.docx
 
QUESTION 3 Associate each application with the type of transmisision-.docx
QUESTION 3 Associate each application with the type of transmisision-.docxQUESTION 3 Associate each application with the type of transmisision-.docx
QUESTION 3 Associate each application with the type of transmisision-.docx
 

Kürzlich hochgeladen

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Explain the motivation behind using a header file for a C program-Solu.docx

  • 1. Explain the motivation behind using a header file for a C program. Solution A header file is a file containing C declarations and macro definitions to be shared between several source files. Header files purpose: System header files declare the interfaces to parts of the operating system. these will provide the definitions and declarations you need to invoke system calls and libraries. Your own header files contain declarations for interfaces between the source files of your program. Each time you have a group of related declarations and macro definitions all or most of which are needed in several different source files, it is a good idea to create a header file for them. Including a header file is equal to copying the content of the header file