return statement

Terminates current function and returns specified value to the caller function. Syntax return expression ; (1) return ; (2) Explanation 1) Evaluates the expression, terminates the current function and returns the result of the expression to the caller (the value returned becomes the value of the function call expression). Only valid if the function return type is not void. 2) Terminates the current function. Only valid if the function return type is void. If the type of th

sizeof operator

Queries size of the object or type. Used when actual size of the object must be known. Syntax sizeof( type ) (1) sizeof expression (2) Both versions return a value of type size_t. Explanation 1) Returns the size, in bytes, of the object representation of type 2) Returns the size, in bytes, of the object representation of the type of expression Notes Depending on the computer architecture, a byte may consist of 8 or more bits, the exact number provided as CHAR_BIT. si

thrd_detach

Defined in header <threads.h> int thrd_detach( thrd_t thr ); (since C11) Detaches the thread identified by thr from the current environment. The resources held by the thread will be freed automatically once the thread exits. Parameters thr - identifier of the thread to detach Return value thrd_success if successful, thrd_error otherwise. References C11 standard (ISO/IEC 9899:2011): 7.26.5.3 The thrd_detach function (p: 383-384) See also thrd_join

ccoshf

Defined in header <complex.h> float complex ccoshf( float complex z ); (1) (since C99) double complex ccosh( double complex z ); (2) (since C99) long double complex ccoshl( long double complex z ); (3) (since C99) Defined in header <tgmath.h> #define cosh( z ) (4) (since C99) 1-3) Computes the complex hyperbolic cosine of z. 4) Type-generic macro: If z has type long double complex, ccoshl is called. if z has type double complex, c

C memory management library

Functions Defined in header <stdlib.h> malloc allocates memory (function) calloc allocates and zeroes memory (function) realloc expands previously allocated memory block (function) free deallocates previously allocated memory (function) aligned_alloc (C11) allocates aligned memory (function) References C11 standard (ISO/IEC 9899:2011): 7.22.3 Memory management functions (p: 347-349) C99 standard (ISO/IEC 9899:1999): 7.20.3 Memory management funct

Increment/decrement operators

Increment/decrement operators are unary operators that increment/decrement the value of a variable by 1. They can have postfix form: expr ++ expr -- As well as the prefix form: ++ expr -- expr The operand expr of both prefix and postfix increment or decrement must be a modifiable lvalue of integer type (including _Bool and enums), real floating type, or a pointer type. It may be cvr-qualified, unqualified, or atomic. The result of the postfix increment and decrement

Typedef declaration

The typedef declaration provides a way to declare an identifier as a type alias, to be used to replace a possibly complex type name. The keyword typedef is used in a declaration, in the grammatical position of a storage-class specifier, except that it does not affect storage or linkage: typedef int int_t; // declares int_t to be an alias for the type int typedef char char_t, *char_p, (*fp)(void); // declares char_t to be an alias for char // char_p to

fputwc

Defined in header <wchar.h> wint_t fputwc( wchar_t ch, FILE *stream ); (since C95) wint_t putwc( wchar_t ch, FILE *stream ); (since C95) Writes a wide character ch to the given output stream stream. putwc() may be implemented as a macro and may evaluate stream more than once. Parameters ch - wide character to be written stream - the output stream Return value ch on success, WEOF on failure. If an encoding error occurs, errno is set to EILSEQ. Exa

iswctype

Defined in header <wctype.h> int iswctype( wint_t wc, wctype_t desc ); (since C95) Classifies the wide character wc using the current C locale's LC_CTYPE category identified by desc. Parameters wc - the wide character to classify desc - the LC_CTYPE category, obtained from a call to wctype Return value Non-zero if the character wc has the property identified by desc in LC_CTYPE facet of the current C locale, zero otherwise. Example #include <loca

thread_local

Defined in header <threads.h> #define thread_local _Thread_local (since C11) Convenience macro which can be used to specify that an object has thread-local storage duration. References C11 standard (ISO/IEC 9899:2011): 7.26.1/3 thread_local (p: 376)