User Program Communication

Including Header Files in C

A C program can include header files. They are used to provide either an interface, which gives function prototypes for definition, or to provide pre-defined definitions.


Syntax
//for standard system header files, like stdio.h. Will search standard system directories
#include <file> 

//for header files built by the user, within the source code's directory
#include "file"

Notes

These header files are included and compiled by the preprocessor.


Example
#include <stdio.h>
#include "myHeader.h"

Add to Slack

< Commenting   |   Local Variables >

© 2019 SyntaxDB. All Rights Reserved.