Created: 2023-01-10 15:53
Status: #concept
Subject: Programming
Tags: npm Function Framework

Library

A collection of user-made pre-written programs, modules, and Functions that serve a thematic or correlated purpose.

Similar to how books are organized by genre; libraries organize code by function.

For Example: C <stdio.h> Library

#include <stdio.h> // use a directive to include library functions in the program

int main(void)
{
	printf("Hello World!"); // printf() is a function found in the stdio.h library!
}
When we #include a library with angled brackets <lib.h>, that means we are looking for the lib.h file in operating system's Path for libraries.

  • for example, in Linux, the C standard library is stored in /usr/lib/libc.

When we use double quotation marks "relative.h", we are looking within the current working Directory for the relative.h header file.

References

Connected Pages
On this page
Library For Example: C Library
  • References