assert

Defined in header <assert.h> #ifdef NDEBUG #define assert(condition) ((void)0) #else #define assert(condition) /*implementation defined*/ #endif The definition of the macro assert depends on another macro, NDEBUG, which is not defined by the standard library. If NDEBUG is defined as a macro name at the point in the source code where <assert.h> is included, then assert does nothing. If NDEBUG is not defined, then assert checks if its argument (which must have scalar ty

Array initialization

When initializing an object of array type, the initializer must be either a string literal (optionally enclosed in braces) or be a brace-enclosed list of initialized for array members: = string_literal (1) = { designator(optional) expression , ... } (2) 1) string literal initializer for character and wide character arrays 2) comma-separated list of expressions that are initializers for array elements, optionally using array designators of the form [ constant-expression ] = (s

ASCII Chart

The following chart contains all 128 ASCII decimal (dec), octal (oct), hexadecimal (hex) and character (ch) codes. dec oct hex ch dec oct hex ch dec oct hex ch dec oct hex ch 0 0 00 NUL (null) 32 40 20 (space) 64 100 40 @ 96 140 60 ` 1 1 01 SOH (start of header) 33 41 21 ! 65 101 41 A 97 141 61 a 2 2 02 STX (start of text) 34 42 22 " 66 102 42 B 98 142 62 b 3 3 03 ETX (end of text) 35 43 23

asctime

Defined in header <time.h> char* asctime( const struct tm* time_ptr ); (1) errno_t asctime_s(char *buf, rsize_t bufsz, const struct tm *time_ptr); (2) (since C11) 1) Converts given calendar time tm to a textual representation of the following fixed 25-character form: Www Mmm dd hh:mm:ss yyyy\n Www - three-letter English abbreviated day of the week from time_ptr->tm_wday, one of Mon, Tue, Wed, Thu, Fri, Sat, Sun. Mmm - three-letter English abbreviated month name

Array declaration

Array is a type consisting of a contiguously allocated nonempty sequence of objects with a particular element type. The number of those objects (the array size) never changes during the array lifetime. Syntax In the declaration grammar of an array declaration, the type-specifier sequence designates the element type (which must be a complete object type), and the declarator has the form: [ static(optional) qualifiers(optional) expression(optional) ] (1) [ qualifiers(optional) static(op

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

Arithmetic operators

Arithmetic operators apply standard mathematical operations to their operands. Operator Operator name Example Result + unary plus +a the value of a after promotions - unary minus -a the negative of a + addition a + b the addition of a and b - subtraction a - b the subtraction of b from a * product a * b the product of a and b / division a / b the division of a by b % modulo a % b the remainder of a divided by b ~ bitwise NOT ~

Analyzability

This optional extension to the C language limits the potential results of executing some forms of undefined behavior, which improves the effectiveness of static analysis of such programs. Analyzability is only guaranteed to be enabled if the predefined macro constant __STDC_ANALYZABLE__(C11) is defined by the compiler. If the compiler supports analyzability, any language or library construct whose behavior is undefined is further classified between critical and bounded undefined behavior, and t

alignas

Appears in the declaration syntax as one of the type specifiers to modify the alignment requirement of the object being declared. Syntax _Alignas ( expression ) (1) (since C11) _Alignas ( type ) (2) (since C11) expression - any integer constant expression whose value is a valid alignment or zero type - any type name This keyword is also available as convenience macro alignas, available in the header <stdalign.h>. Explanation The alignas specifier can only

aligned_alloc

Defined in header <stdlib.h> void *aligned_alloc( size_t alignment, size_t size ); (since C11) Allocate size bytes of uninitialized storage whose alignment is specified by alignment. The size parameter must be an integral multiple of alignment. aligned_alloc is thread-safe: it behaves as though only accessing the memory locations visible through its argument, and not any static storage. A previous call to free or realloc that deallocates a region of memory synchronizes-with