C`longjmp(env, val)` from `<setjmp.h>` restores the environment saved by the most recent `setjmp(env)` and does not return to its call site. The resumed `setjmp` returns `val`, or returns `1` when `val == 0`, so a jump remains distinguishable from the initial pass.
Advanced · C23C`lround(x)` from `<math.h>` rounds a `double` to the nearest `long int` value; an exact halfway case always moves away from zero, independently of the current rounding mode. The `lroundf` and `lroundl` variants accept `float` and `long double`, respectively.
Intermediate · C23C`malloc(size)` from `<stdlib.h>` reserves space for an object of `size` bytes and returns a pointer to the start of a disjoint region, or a null pointer on failure. The new bytes have an indeterminate representation; unlike `calloc`, the function does not clear them.
Basic · C23C`mbrtoc16(pc16, s, n, ps)` from `<uchar.h>` examines at most `n` bytes of the next execution multibyte character and stores the corresponding UTF-16 `char16_t` code unit. The `mbstate_t` object designated by `ps` preserves conversion state between calls; `pc16 == NULL` suppresses only the output store.
Advanced · C23C`mbrtoc32(pc32, s, n, ps)` from `<uchar.h>` converts at most `n` bytes of the next execution multibyte character to a UTF-32 `char32_t` unit. Its `mbstate_t` state lets a character continue across buffer boundaries; a null `pc32` still performs conversion but suppresses the store.
Advanced · C23C`mbrtoc8(pc8, s, n, ps)` from C23 `<uchar.h>` converts the next execution multibyte character into successive UTF-8 `char8_t` code units; in C23, `char8_t` is the same type as `unsigned char`. It examines at most `n` bytes, while `mbstate_t` retains a partial character and pending units.
Advanced · C23C`mbrtowc(pwc, s, n, ps)` from `<wchar.h>` examines at most `n` bytes of the next multibyte character in the current execution encoding. When a valid character is completed, it returns the number of bytes that completed it and stores the corresponding `wchar_t` if `pwc != NULL`; the `mbstate_t` at `ps` carries a character across buffer boundaries.
Advanced · C23CThe C23 generic function `memchr(s, c, n)` from `<string.h>` finds the first byte equal to `c` after conversion to `unsigned char` among the first `n` bytes of the object at `s`. It returns a pointer exactly to the first match or null; the implementation must behave as if it reads sequentially and stops immediately on a match.
Intermediate · C23C`memcmp(s1, s2, n)` from `<string.h>` lexicographically compares the first `n` bytes of two object representations, interpreting every byte as `unsigned char`. It returns zero if all are equal; otherwise it returns a value whose sign is the difference of the first unequal pair. The sign, not the exact magnitude, is guaranteed.
Intermediate · C23C`memcpy(s1, s2, n)` from `<string.h>` copies exactly `n` bytes of object representation from source `s2` to writable destination `s1` and returns the original value of `s1`. Bytes are interpreted as `unsigned char`; the function knows nothing about elements, array lengths, or text terminators.
Intermediate · C23C`memmove(s1, s2, n)` from `<string.h>` copies `n` bytes of representation from source to writable destination and returns the original `s1`. Unlike `memcpy`, its result is defined when the ranges overlap: semantics are as if the source bytes were first copied into a separate temporary array of `n` bytes.
Intermediate · C23Cmemset from <string.h> fills n bytes with c converted to unsigned char. It operates on bytes, not on the values of array elements.
Basic · C23; repository compiler flag, production runtime not attestedCThe C23 function memset_explicit fills a specified memory region with a chosen byte. It is intended to erase sensitive data without the optimizer removing the write as an unnecessary operation.
Intermediate · C23; repository compiler flag, production runtime not attestedCmktime converts local time stored in struct tm into time_t, normalizing the fields on success.
Intermediate · C23; repository compiler flag, production runtime not attestedCThe modf function from <math.h> returns the fractional part of a double and writes its integral part through a pointer. Both parts remain double values.
Basic · C23; repository compiler flag, production runtime not attestedCmtx_destroy from <threads.h> releases a mutex's resources. It returns no value; no thread may be blocked waiting for that mutex during destruction.
Intermediate · C23; repository compiler flag, production runtime not attestedCmtx_init from <threads.h> initializes a mutex with selected properties. Check its result before using the object, and finish its lifecycle with mtx_destroy.
Intermediate · C23; repository compiler flag, production runtime not attestedCmtx_lock waits to acquire a mutex. It returns thrd_success on success or thrd_error on failure.
Basic · C23; repository compiler flag, production runtime not attestedC`mtx_timedlock` attempts to lock a mutex by an absolute deadline based on `TIME_UTC`. It distinguishes successful acquisition, timeout, and error.
Intermediate · C23; repository compiler flag, production runtime not attestedCmtx_trylock attempts to acquire a mutex without waiting for its release. Its result distinguishes success, busy, and error.
Intermediate · C23; repository compiler flag, production runtime not attestedCmtx_unlock from <threads.h> unlocks a mutex owned by the calling thread and returns a success or error code.
Intermediate · C23; repository compiler flag, production runtime not attestedCnearbyint returns an integer-valued double using the current rounding direction without raising the inexact exception.
Intermediate · C23; repository compiler flag, production runtime not attestedCperror from <stdio.h> prints a message for the current errno value to stderr, optionally preceded by your own description. It does not detect an error and returns no value.
Basic · C23; repository compiler flag, production runtime not attestedCThe pow function from <math.h> computes x raised to y, accepting and returning double. Learn its syntax and its domain and range limitations.
Basic · C23; repository compiler flag, production runtime not attested