const

Usage const type qualifier

fmin

Defined in header <math.h> float fminf( float x, float y ); (1) (since C99) double fmin( double x, double y ); (2) (since C99) long double fminl( long double x, long double y ); (3) (since C99) Defined in header <tgmath.h> #define fmin( x, y ) (4) (since C99) 1-3) Returns the smaller of two floating point arguments, treating NaNs as missing data (between a NaN and a numeric value, the numeric value is chosen). 4) Type-generic macr

static_assert

Defined in header <assert.h> #define static_assert _Static_assert This convenience macro expands to the keyword _Static_assert. Example #include <assert.h> int main(void) { static_assert(2 + 2 == 4, "2+2 isn't 4"); // well-formed static_assert(sizeof(int) < sizeof(char), "this program requires that int is less than char"); // compile-time error } References C11 standard (ISO/IEC 9899:2011): 7.2/3 Diagnostics <assert.h>

clock

Defined in header <time.h> clock_t clock(void); Returns the approximate processor time used by the process since the beginning of an implementation-defined era related to the program's execution. To convert result value to seconds, divide it by CLOCKS_PER_SEC. Only the difference between two values returned by different calls to clock is meaningful, as the beginning of the clock era does not have to coincide with the start of the program. clock time may advance faster or sl

tm

Defined in header <time.h> struct tm; Structure holding a calendar date and time broken down into its components. Member objects int tm_sec seconds after the minute – [0, 61](until C99) / [0, 60] (since C99)[note 1] int tm_min minutes after the hour – [0, 59] int tm_hour hours since midnight – [0, 23] int tm_mday day of the month – [1, 31] int tm_mon months since January – [0, 11] int tm_year years since 1900 int tm_wday days since Sunday – [0,

wcsncmp

Defined in header <wchar.h> int wcsncmp( const wchar_t* lhs, const wchar_t* rhs, size_t count ); (since C95) Compares at most count wide characters of two null-terminated wide strings. The comparison is done lexicographically. Parameters lhs, rhs - pointers to the null-terminated wide strings to compare count - maximum number of characters to compare Return value Negative value if lhs is less than rhs. ​0​ if lhs is equal to rhs. Positive value if lhs is

iswspace

Defined in header <wctype.h> int iswspace( wint_t ch ); (since C95) Checks if the given wide character is a whitespace character, i.e. either space (0x20), form feed (0x0c), line feed (0x0a), carriage return (0x0d), horizontal tab (0x09), vertical tab (0x0b) or any whitespace character specific to the current locale. Parameters ch - wide character Return value Non-zero value if the wide character is a whitespace character, zero otherwise. Example #include

Pseudo-random number generation

Defined in header <stdlib.h> rand generates a pseudo-random number (function) srand seeds pseudo-random number generator (function) RAND_MAX maximum possible value generated by rand() (macro constant) References C11 standard (ISO/IEC 9899:2011): 7.22.2 Pseudo-random sequence generation functions (p: 346-347) C99 standard (ISO/IEC 9899:1999): 7.20.2 Pseudo-random sequence generation functions (p: 312-313) C89/C90 standard (ISO/IEC 9899:1990): 4.10.2 Pseudo-ra

difftime

Defined in header <time.h> double difftime( time_t time_end, time_t time_beg ); Computes difference between two calendar times as time_t objects (time_end - time_beg) in seconds. If time_end refers to time point before time_beg then the result is negative. Parameters time_beg, time_end - times to compare Return value Difference between two times in seconds. Notes On POSIX systems, time_t is measured in seconds, and difftime is equivalent to arithmetic subtr

cnd_init

Defined in header <threads.h> int cnd_init( cnd_t* cond ); (since C11) Initializes new condition variable. The object pointed to by cond will be set to value that identifies the condition variable. Parameters cond - pointer to a variable to store identifier of the condition variable to Return value thrd_success if the condition variable was successfully created. Otherwise returns thrd_nomem if there was insufficient amount of memory or thrd_error if another er