Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.35 KB

libraries_intro.md

File metadata and controls

40 lines (27 loc) · 1.35 KB

#C Libraries Nearly everything in C requires importing a library.

#include <stdio.h>
#include <stdlib.h>

The above code has to come first (like any other dependency management) and imports the two libraries.

The hash indicates that this is a command for the pre-processor, which imports the libraries.

stdio.h is the C standard library header, and contains functions for file input and output.

stdlib.h is the general purpose standard library, and contains utility functions for memory management, process control, conversion, and others.

The angle brackets tell the preproccessor to look in the systems folders.

If you want to import a local file, use double-quotes.

References:

The #include directive

Wikibook C Programming/C Reference/stdio.h

Wikibook C Programming/C Reference/stdlib.h

Stackoverflow: What does #include <stdio.h> really do in a C program