Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

C Standard Library – Reference Manual

C Standard Library - Reference Manual

The following is a detailed list of the C standard library header files and brief descriptions of their functions:

C is a general-purpose, procedural computer programming language. In 1972, Dennis Ritchie designed and developed C at Bell Telephone Laboratories in order to port and develop the UNIX operating system.

C is a widely used computer language; it is as popular as the Java programming language, and both are widely used among modern software programmers.

The C Standard Library contains a set of header files that provide many functions and macros for handling common programming tasks such as input/output, string manipulation, mathematical computation, and memory management..

Who should read this tutorial?

The C standard library can serve as a reference manual for C programmers, who can consult it when developing projects related to systems programming. Each system-related step helps them in their reference. We explain all the C functions in an easy-to-understand way, and you can copy and use them directly in your projects.

What you need to know before reading this tutorial

A basic understanding of the C language will help you understand the built-in C functions covered by this standard library.

Compile/Execute a C program

If you want to learn C programming on a Linux server but do not have the relevant configured environment, you can visit C Online Compiler. With just a few simple clicks, you can experience real programming on a high-end server. This is a completely free online tool.

Standard library

Header File Function description
Standard input/output library, containing printf, scanf, fgets, fputs and other functions.
Standard library functions, including memory allocation, program control, conversion functions, and so on, such as malloc, free, exit, atoi, rand , etc.
String manipulation functions, such as strlen, strcpy, strcat, strcmp , etc.
The math function library, containing various mathematical operation functions, such as sin, cos, tan, exp, log, sqrt , etc.
Time and date functions, such as time, clock, difftime, strftime , etc.
Character handling functions, such as isalpha, isdigit, isspace, toupper, tolower , etc.
Defines limit values of various types, such as INT_MAX, CHAR_MIN, LONG_MAX , etc.
Defines limit values for floating-point types, such as FLT_MAX, DBL_MIN , etc.
Contains the macro assert, used for assertion checks during debugging.
Defines the error code variable errno and related macros, used to represent and handle errors.
Defines some general types and macros, such as size_t, ptrdiff_t, NULL , etc.
Defines functions and macros for handling signals, such as signal, raise , etc.
Provides macros and functions for non-local jumps, such as setjmp, longjmp , etc.
Defines functions and macros related to localization, such as setlocale, localeconv , etc.
Provides macros for handling variadic functions, such as va_start, va_arg, va_end , etc.
Defines the boolean type and values true and false.
Defines integer types with exact widths, such as int8_t, uint16_t , etc.
Provides formatted output macros and functions related to integer types.
Provides functions and macros for complex number operations, such as cabs, carg , etc.
Provides macros for generic math functions to simplify mathematical operations on data of different types.
Provides control over the floating-point environment, such as rounding modes and exception status.