mbrlen

Defined in header <wchar.h> size_t mbrlen( const char* s, size_t n, mbstate_t* ps ); (since C95) Determines the size, in bytes, of the remainder of the multibyte character whose first byte is pointed to by s, given the current conversion state ps. This function is equivalent to the call mbrtowc(nullptr, s, n, ps?ps:&internal) for some hidden object internal of type mbstate_t, except that the expression ps is evaluated only once. Parameters s - pointer to an elem

mblen

Defined in header <stdlib.h> int mblen( const char* s, size_t n ); Determines the size, in bytes, of the multibyte character whose first byte is pointed to by s. If s is a null pointer, resets the global conversion state and determined whether shift sequences are used. This function is equivalent to the call mbtowc((wchar_t*)0, s, n), except that conversion state of mbtowc is unaffected. Notes Each call to mblen updates the internal global conversion state (a static obje

max_align_t

Defined in header <stddef.h> typedef /*implementation-defined*/ max_align_t; (since C11) max_align_t is a type whose alignment requirement is at least as strict (as large) as that of every scalar type. Notes Pointers returned by allocation functions such as malloc are suitably aligned for any object, which means they are aligned at least as strict as max_align_t. max_align_t is usually synonymous with the largest scalar type, which is long double on most platforms, and i

MATH_ERRNO

Defined in header <math.h> #define MATH_ERRNO 1 (since C99) #define MATH_ERREXCEPT 2 (since C99) #define math_errhandling /*implementation defined*/ (since C99) The macro constant math_errhandling expands to an expression of type int that is either equal to MATH_ERRNO, or equal to MATH_ERREXCEPT, or equal to their bitwise OR (MATH_ERRNO | MATH_ERREXCEPT). The value of math_errhandling indicates the type of error handling that is performed by the float

malloc

Defined in header <stdlib.h> void* malloc( size_t size ); Allocates size bytes of uninitialized storage. If allocation succeeds, returns a pointer to the lowest (first) byte in the allocated memory block that is suitably aligned for any object type. If size is zero, the behavior is implementation defined (null pointer may be returned, or some non-null pointer may be returned that may not be used to access storage). malloc is thread-safe: it behaves as though only accessing

Main function

Every C program contains the definition (not the prototype) of a function called main, which is the designated start of the program. int main (void) { body } (1) int main (int argc, char *argv[]) { body } (2) int main (int argc, char *argv[] , other_parameters ) { body } (3) /* another implementation-defined signature */ (4) Parameters argc - Non-negative value representing the number of arguments passed to the program from the environment in which the progr

Lookup and name spaces

When an identifier is encountered in a C program, a lookup is performed to locate the declaration that introduced that identifier and that is currently in scope. C allows more than one declaration for the same identifier to be in scope simultaneously if these identifiers belong to different categories, called name spaces: 1) Label name space: all identifiers declared as labels. 2) Tag names: all identifiers declared as names of structs, unions and enumerated types. Note that all three kinds o

longjmp

Defined in header <setjmp.h> void longjmp( jmp_buf env, int status ); (until C11) _Noreturn void longjmp( jmp_buf env, int status ); (since C11) Loads the execution context env saved by a previous call to setjmp. This function does not return. Control is transferred to the call site of the macro setjmp that set up env. That setjmp then returns the value, passed as the status. If the function that called setjmp has exited (whether by return or by a different longjmp hi

long

Usage long type modifier

Logical operators

Logical operators apply standard boolean algebra operations to their operands. Operator Operator name Example Result ! logical NOT !a the logical negation of a && logical AND a && b the logical AND of a and b || logical OR a || b the logical OR of a and b Logical NOT The logical NOT expression has the form. ! expression where. expression - an expression of any scalar type The logical NOT operator has type int. Its value is ​0​