_Alignof operator

Queries the alignment requirement of its operand type. Syntax _Alignof( type-name ) (since C11) This operator is typically used through the convenience macro alignof, which is provided in the header stdalign.h. Explanation Returns the alignment requirement of the type named by type-name. If type-name is an array type, the result is the alignment requirement of the array element type. The type-name cannot be function type or an incomplete type. The result is an integer constant of

isupper

Defined in header <ctype.h> int isupper( int ch ); Checks if the given character is an uppercase character according to the current C locale. In the default "C" locale, isupper returns true only for the uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ). If isupper returns true, it is guaranteed that iscntrl, isdigit, ispunct, and isspace return false for the same character in the same C locale. The behavior is undefined if the value of ch is not representable as unsigned char

wcsspn

Defined in header <wchar.h> size_t wcsspn( const wchar_t* dest, const wchar_t* src ); (since C95) Returns the length of the maximum initial segment of the wide string pointed to by dest, that consists of only the characters found in wide string pointed to by src. Parameters dest - pointer to the null-terminated wide string to be analyzed src - pointer to the null-terminated wide string that contains the characters to search for Return value The length of

strrchr

Defined in header <string.h> char *strrchr( const char *str, int ch ); Finds the last occurrence of ch (after conversion to char as if by (char)ch) in the null-terminated byte string pointed to by str (each character interpreted as unsigned char). The terminating null character is considered to be a part of the string and can be found if searching for '\0'. The behavior is undefined if str is not a pointer to a null-terminated byte string. Parameters str - pointer t

Arithmetic types

(See also type for type system overview and the list of type-related utilities that are provided by the C library). Boolean type _Bool (also accessible as the macro bool) - type, capable of holding one of the two values: 1 and 0 (also accessible as the macros true and false). Note that conversion to _Bool does not work the same as conversion to other integer types: (bool)0.5 evaluates to 1, whereas (int)0.5 evaluates to ​0​. (since C99) Character types signed char - type for signed

offsetof

Defined in header <stddef.h> #define offsetof(type, member) /*implementation-defined*/ The macro offsetof expands to a constant of type size_t, the value of which is the offset, in bytes, from the beginning of an object of specified type to its specified member, including padding if any. Example #include <stdio.h> #include <stddef.h> struct S { char c; double d; }; int main(void) { printf("the first element is at offset %zu\n", offsetof(stru

putchar

Defined in header <stdio.h> int putchar( int ch ); Writes a character ch to stdout. Internally, the character is converted to unsigned char just before being written. Equivalent to putc(ch, stdout). Parameters ch - character to be written Return value On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stdout. Example putchar with error checking. #include <stdio.h> #include <stdlib.h>

atomic_flag_test_and_set

Defined in header <stdatomic.h> _Bool atomic_flag_test_and_set( volatile atomic_flag* obj ); (1) (since C11) _Bool atomic_flag_test_and_set_explicit( volatile atomic_flag* obj, memory_order order ); (2) (since C11) Atomically changes the state of a atomic_flag pointed to by obj to set (true) and returns the previous value. The first version orders memory accesses according to memory_order_seq_cst, the second version orders memory accesses according to order. The argum

cimagf

Defined in header <complex.h> float cimagf( float complex z ); (1) (since C99) double cimag( double complex z ); (2) (since C99) long double cimagl( long double complex z ); (3) (since C99) Defined in header <tgmath.h> #define cimag( z ) (4) (since C99) 1-3) Returns the imaginary part of z. 4) Type-generic macro: if z has type long double complex, long double imaginary, or long double, cimagl is called. If z has type float complex

NAN

Defined in header <math.h> #define NAN /*implementation defined*/ (since C99) The macro NAN expands to constant expression of type float which evaluates to a quiet not-a-number (QNaN) value. If the implementation does not support QNaNs, this macro constant is not defined. Notes There are many different NaN values, differentiated by their payloads and their sign bits. The contents of the payload and the sign bit of the NaN generated by the macro NAN are implementation-def