Successfully reported this slideshow.
Your SlideShare is downloading. ×

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

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 1 Ad

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

Download to read offline

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
.

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
.

Advertisement
Advertisement

More Related Content

More from rtodd432 (20)

Recently uploaded (20)

Advertisement

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

  1. 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

×