atomic_signal_fence

Defined in header <stdatomic.h> void atomic_signal_fence( memory_order order ); (since C11) Establishes memory synchronization ordering of non-atomic and relaxed atomic accesses, as instructed by order, between a thread and a signal handler executed on the same thread. This is equivalent to std::atomic_thread_fence, except no CPU instructions for memory ordering are issued. Only reordering of the instructions by the compiler is suppressed as order instructs. For example, wr

Other operators

A collection of operators that do not fit into any of the other major categories. Operator Operator name Example Description (...) function call f(...) call the function f(), with zero or more arguments , comma operator a, b evaluate expression a, disregard its return value and complete any side-effects, then evaluate expression b, returning the type and the result of this evaluation (type) type cast (type)a cast the type of a to type ? : conditional operator

ungetc

Defined in header <stdio.h> int ungetc( int ch, FILE *stream ); Puts the character ch back to the given file stream. Parameters ch - character to be put back stream - file stream to put the character back to Return value On success ch is returned. On failure EOF is returned and the given stream remains unchanged. Example ungetc with error checking. #include <stdio.h> #include <stdlib.h> int main(void) { FILE* fp = fopen("test.txt",

_Generic

Usage Type-generic expression

signal

Defined in header <signal.h> void (*signal( int sig, void (*handler) (int))) (int); Sets the error handler for signal sig. The signal handler can be set so that default handling will occur, signal is ignored, or an user-defined function is called. When signal handler is set to a function and a signal occurs, it is implementation defined whether signal(sig, SIG_DFL) will be executed immediately before the start of signal handler. Also, the implementation can prevent some imp

wcsrtombs

Defined in header <wchar.h> size_t wcsrtombs( char *dst, const wchar_t **src, size_t len, mbstate_t* ps ) (1) (since C95) errno_t wcsrtombs_s( size_t *restrict retval, char *restrict dst, rsize_t dstsz, const wchar_t **restrict src, rsize_t len, mbstate_t *restrict ps); (2) (since C11) 1) Converts a sequence of wide characters from the array whose first element is pointed to by *src to its narrow multibyte representation that begins in the conver

raise

Defined in header <signal.h> int raise( int sig ); Sends signal sig to the program. The signal handler, specified using signal(), is invoked. If the user-defined signal handling strategy is not set using signal() yet, it is implementation-defined whether the signal will be ignored or default handler will be invoked. Parameters sig - the signal to be sent. It can be an implementation-defined value or one of the following values: SIGABRTSIGFPESIGILLSIGINTSIGSEGVSIGT

fetestexcept

Defined in header <<fenv.h>> int fetestexcept( int excepts ); (since C99) Determines which of the specified subset of the floating point exceptions are currently set. The argument excepts is a bitwise OR of the floating point exception macros. Parameters excepts - bitmask listing the exception flags to test Return value Bitwise OR of the floating-point exception macros that are both included in excepts and correspond to floating-point exceptions currentl

mtx_lock

Defined in header <threads.h> int mtx_lock( mtx_t* mutex ); (since C11) Blocks the current thread until the mutex pointed to by mutex is locked. The behavior is undefined if the current thread has already locked the mutex and the mutex is not recursive. Prior calls to mtx_unlock on the same mutex synchronize-with this operation, and all lock/unlock operations on any given mutex form a single total order (similar to the modification order of an atomic). Parameters mutex

_Complex_I

Defined in header <complex.h> #define _Complex_I /* unspecified */ (since C99) The _Complex_I macro expands to a value of type const float _Complex with the value of the imaginary unit. Notes This macro may be used when I is not available, such as when it has been undefined by the application. Unlike _Imaginary_I and CMPLX, use of this macro to construct a complex number may lose the sign of zero on the imaginary component. Example #include <stdio.h> #include