Le librerie
Nel linguaggio C, ci sono alcune funzioni predefinite che possono essere usate senza dichiarazione, queste funzioni sono ragruppate nelle LIBRERIE, che sono l'insieme di file che contengono i prototipi delle funzioni.Inserendo all'inizio di ogni programma la direttiva #INCLUDE e specificando il file con estensione .h adatto, si possono utilizzare le funzioni predefinite incluse nella libreria dichiarata.
Esempio
#include <stdio.h>#include <math.h>
... .... ....
Le principali librerie e le loro funzioni
| stdlib.h | stdio.h | math.h | string.h |
|---|---|---|---|
| Operazioni generali | Input e output | Funzioni matematiche | Funzioni per le stringhe |
| abort abs atexit atof atoi atol bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs mbtowc qsort rand realloc srand strtodstrtol strtoul system wcstombs wctomb | clearerr fclose feof ferror fflush fgetpos fopen fread freopen fseek fsetpos ftell fwrite remove rename rewind setbuf setvbuf tmpfile tmpnam fprintf fscan printf scanf sprintf sscanf vfprintf vprintf vsprintf fgetc fgets fputc fputs getc getchar gets putc putchar puts ungetc perror | acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp ldexp log log10 modf pow sin sinh sqrt tan tanh | memchr memcmp memcpy memmove memset strcat strncat strchr strcmp strncmp strcoll str cpy strncpy strcspn strerror strlen strpbrk strrchr strspn strstr strtok strxfrm |


