From the course: Complete Guide to C Programming Foundations
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Understanding header files and libraries - C Tutorial
From the course: Complete Guide to C Programming Foundations
Understanding header files and libraries
- [Instructor] It's common for beginning C programmers to confuse header files with C language libraries. These are two different things. Header files are used in the source code and libraries are used by the linker. Traditionally, the header files are found on a Unix system in the user include directory, and there they are. When you use the include pre-processor directive with angle brackets, this is the primary location from which the header files are fetched. The contents of these files are C language code. You see definitions, prototypes, and pre-processor directives listed. Library files are primarily located in the user lib directory. And there they are. When you create a C program, the linker looks in this directory for libraries to link in, such as the standard C library, which contains definitions for C functions such as printf. These are object code files exactly like those created by the compiler that contain binary data, not C language code. Other locations are used for…
Contents
-
-
-
Coding your first program3m 40s
-
(Locked)
Challenge: Write your own code51s
-
(Locked)
Solution: Write your own code1m 50s
-
(Locked)
Getting into the C language2m 34s
-
(Locked)
Reviewing code structure3m 52s
-
(Locked)
Working the C development cycle3m 45s
-
(Locked)
Challenge: Find and fix the bugs43s
-
(Locked)
Solution: Find and fix the bugs1m 28s
-
(Locked)
Exploring the preprocessor3m 23s
-
(Locked)
Understanding header files and libraries3m 19s
-
(Locked)
Adding comments2m 49s
-
(Locked)
Chapter challenge: Building the foundation1m 11s
-
(Locked)
Chapter solution: Building the foundation1m 38s
-
-
-
-
-
-
-
-
-
-
-