Static libraries in C.
So. Before we start explaining static libraries, we need to know what is a library in C.
A library in C is a collection of header files. The library consists of an interface expressed of functions in a . h file named the “header file” .The format of a library varies with the operating system and compiler one is using. this libraries are so useful when you are programming because they contain functions that you can use in you own code by just calling them. an example of this is the function “Pirntf” wich is from the standard library (STDIO.H).
So now. In the C programming language, a static library is a compiled object file containing all symbols required by the main program to operate (functions, variables etc.) as opposed to having to pull in separate entities.

Static libraries aren’t loaded by the compiler at run-time; only the executable file need be loaded. Static library object files instead are loaded near the end of compilation during its linking phase.
How to create a static library in C?
1. First put all the important files such as functions and the header file (.h) in a directory

2. Compile all the .c files into .o files, Use the -c option so that compiler doesn’t link the object files yet but instead creates counterpart object (.o) file for each source (.c) file.

3. put all the .o files that you compiled in the static library, using the command “ar -rc [library name.a] [files]” the “r” argument tells the machine to replace the library if it already exists. and the “c” tells to create it if it doesn't exists.

to check what files are inside the static library use the command “ar -t [library.a]”. and as you can see, you have all your files (functions) inside your static library, this is a great way to save memory and make easier the compilation process.
To use your library just include it in your C code, using #include “YourLibrary.a” and you can call those functions by their names. the same way you call the function “printf” in the standard library. you can call yours by their names, this is an example using the function print alphabet.
ubuntu@ip-172-31-63-244:~/holbertonschool$ gcc main.c -L. -lholbertonschool -o alpha
ubuntu@ip-172-31-63-244:~/holbertonschool$ ./alpha
abcdefghijklmnopqrstuvwxyzubuntu
ubuntu@ip-172-31-63-244:~/holbertonschool$