Union declaration

A union is a type consisting of a sequence of members whose storage overlaps (as opposed to struct, which is a type consisting of a sequence of members whose storage is allocated in an ordered sequence). The value of at most one of the members can be stored in a union at any one time. The type specifier for a union is identical to the struct type specifier except for the keyword used: Syntax union name(optional) { struct-declaration-list } (1) union name (2) name - the

ungetwc

Defined in header <wchar.h> wint_t ungetwc( wint_t ch, FILE *stream ); (since C95) Puts the wide character ch back to the given file stream. Only one wide character pushback is guaranteed. Parameters ch - wide character to be put back stream - file stream to put the wide character back to Return value On success ch is returned. On failure WEOF is returned and the given stream remains unchanged. References C11 standard (ISO/IEC 9899:2011): 7.29.3.10

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

typedef

Usage typedef declaration

Type-generic math

The header <tgmath.h> includes the headers <math.h> and <complex.h> and defines several type-generic macros that determine which real or, when applicable, complex function to call based on the types of the arguments. For each macro, the parameters whose corresponding real type in the unsuffixed math.h function is double are known as generic parameters (for example, both parameters of pow are generic parameters, but only the first parameter of scalbn is a generic parameter). Wh

Type

(See also arithmetic types for the details on most built-in types and the list of type-related utilities that are provided by the C library). Objects, functions, and expressions have a property called type, which determines the interpretation of the binary value stored in an object or evaluated by the expression. Type classification The C type system consists of the following types: the type void basic types the type char signed integer types standard: signed char, short, int, long, lon

Type support

Basic types Fundamental types defined by the language Additional basic types and convenience macros Defined in header <stddef.h> size_t unsigned integer type returned by the sizeof operator (typedef) ptrdiff_t signed integer type returned when subtracting two pointers (typedef) NULL implementation-defined null pointer constant (macro constant) max_align_t (C11) a type with alignment requirement as great as any other scalar type (typedef) offsetof byt

TSS_DTOR_ITERATIONS

Defined in header <threads.h> #define TSS_DTOR_ITERATIONS /* unspecified */ (since C11) Expands to a positive integral constant expression defining the maximum number of times a destructor for thread-local storage pointer will be called by thrd_exit. This constant is equivalent to the POSIX PTHREAD_DESTRUCTOR_ITERATIONS. References C11 standard (ISO/IEC 9899:2011): 7.26.1/3 TSS_DTOR_ITERATIONS (p: 376)

tss_get

Defined in header <threads.h> void *tss_get( tss_t tss_key ); (since C11) Returns the value held in thread-specific storage for the current thread identified by tss_key. Different threads may get different values identified by the same key. On thread startup (see thrd_create), the values associated with all TSS keys are NULL. Different value may be placed in the thread-specific storage with tss_set. Parameters tss_key - thread-specific storage key, obtained from tss

tss_set

Defined in header <threads.h> int tss_set( tss_t tss_id, void *val ); (since C11) Sets the value of the thread-specific storage identified by tss_id for the current thread to val. Different threads may set different values to the same key. The destructor, if available, is not invoked. Parameters tss_id - thread-specific storage key, obtained from tss_create and not deleted by tss_delete val - value to set thread-specific storage to Return value thrd_succ