The C Standard Library
In order to use basic functions in C, you have to include the C Standard Library in your program.
This library contains the definitions for functions like printf() and scanf(), which can be used to display things to the console and take in information from the user to use in your program, respectively.
You’ll learn more about these functions later in this chapter, but know that you need to include the following statement at the top of your C programs to access basic functions:
#include <stdio.h>
Breaking down the components of the above statement, #include should always be used when importing a library to use in your program. “stdio” is the name of the standard library, and it stands for “standard input and output”. The “.h” at the end of the library name represents the fact that it is a header file, and the whole name is stored in these symbols “<>” which are used to signify that the contents inside are the name of a library.
You’ll gain a deeper understanding of libraries in a later chapter. For now, remember to include the above statement at the top of each of your C programs.
Copyright © 2021 Code 4 Tomorrow. All rights reserved.
The code in this course is licensed under the MIT License.
If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.