SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais de rtodd432

Mais de 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
 

Último

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
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Último (20)

Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
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...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
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
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
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
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 

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