C tutorials
C is a small, statically typed, compiled language created by Dennis Ritchie at Bell Labs in 1972. It is the language of operating system kernels, language runtimes, database engines and embedded firmware, and its syntax and semantics influence most languages that came after it. A C program is a set of functions that call each other and the standard library, and the compiler translates them into machine instructions ahead of time.
The tutorials in this section start with the first program and the structure of a source file, then cover the types a program can use, arrays and functions, the operators that combine values, the bit-level operations needed for flags and packed data, and the header files that hold a multi-file program together. Every example is a complete program, compiled with an explicit standard and warnings enabled, and the output shown is the output of the real run. The standard library reference below documents one function or one family of functions per page.
C language
These pages cover the language itself, from the first program to the operators that work on individual bits.
C Standard Library
The reference pages describe the headers and functions of the ISO C standard library, with a complete example and its verified output on every page.
- C fopen Function
- C fclose Function
- C freopen Function
- C fflush Function
- C tmpfile Function
- C setvbuf Function
- C fgetc and getc Functions
- C getchar Function
- C fputc and putc Functions
- C putchar Function
- C ungetc Function
- C fgets Function
- C fputs Function
- C puts Function
- C fread Function
- C fwrite Function
- C fseek Function
- C ftell Function
- C fgetpos Function
- C fsetpos Function
- C rewind Function
- C feof Function
- C ferror Function
- C clearerr Function
- C getline Function
- C getdelim Function
- C printf Function
- C fprintf Function
- C sprintf Function
- C snprintf Function
- C scanf Function
- C fscanf Function
- C sscanf Function
- C vprintf Function
- C vfprintf Function
- C vsprintf Function
- C vsnprintf Function
- C vscanf Function
- C vfscanf Function
- C vsscanf Function
- C atoi Function
- C atol Function
- C atoll Function
- C memchr Function
- C memcmp Function
- C memcpy Function
- C memcpy_s Function
- C memmove Function
- C memmove_s Function
- C memset Function
- C strcat Function
- C strcat_s Function
- C strchr Function
- C strcmp Function
- C strcoll Function
- C strcpy Function
- C strcpy_s Function
- C strcspn Function
- C strerror Function
- C strlen Function
- C strncat Function
- C strncat_s Function
- C strncmp Function
- C strncpy Function
- C strncpy_s Function
- C strnlen Function
- C strpbrk Function
- C strrchr Function
- C strspn Function
- C strstr Function
- C strtod Function
- C strtof Function
- C strtok Function
- C strtok_s Function
- C strtol Function
- C strtold Function
- C strtoll Function
- C strtoul Function
- C strtoull Function
last modified November 14, 2026