C Programming Absolute Beginner's Guide (3rd Edition)

(Romina) #1
FIGURE 7.1 #include inserts a disk file into the middle of another file.

Note

When you’ve used a word processor, you might have used an #include type of
command if you merged a file stored on disk into the middle of the file you were
editing.

When you install your compiler, the installation program sets up a separate location on your disk (in a
directory) for various #include files that come with your compiler. When you want to use one of
these built-in #include files, use the #include format with the angled brackets, < and >.


Warning

How do you know when to use a built-in #include file? Good question! All built-in
functions, such as printf(), have corresponding #include files. When this book
describes a built-in function, it also tells you exactly which file to include.

You’ve already used two built-in functions in your programs: printf() and strcpy().
(main() is not a built-in C function; it is a function you must supply.) As a reminder, the
#include file for printf() is stdio.h (which stands for standard I/O), and the #include
file for the strcpy() function is string.h.

Free download pdf