C #include
This preprocessor directive is used to spread code of given file into the present file. It is used include system-defined header files. this file is not built, compiler renders error.
It has three variants:
- #include <file>
- #include “file”
- #include anything else
#include <file>
This variant is used for system header files. It searches for a file named file named file in a list of directories specified by you, then in a standard list of system directories.
#include “file”
It is used for header files of the own program. It searches for a file named file first in the current directory, then in the same directories used for system header files and the current directory is the directory of the current input file.
#include anything else
This variant is called a computed #include. Any #include directive which argument does not fit the above two forms is a computed include.
Example:
#include <stdio.h>
void main() {
printf("Hello World!");
}
Quickly Find What You Are Looking For
OnlineTpoint is a website that is meant to offer basic knowledge, practice and learning materials. Though all the examples have been tested and verified, we cannot ensure the correctness or completeness of all the information on our website. All contents published on this website are subject to copyright and are owned by OnlineTpoint. By using this website, you agree that you have read and understood our Terms of Use, Cookie Policy and Privacy Policy.
point.com