Function definitions

A function definition associates the function body (a sequence of declarations and statements) with the function name and parameter list. Unlike function declaration, function definitions are allowed at file scope only (there are no nested functions). C supports two different forms of function definitions: specifiers-and-qualifiers parameter-list-declarator function-body (1) specifiers-and-qualifiers identifier-list-declarator declaration-list function-body (2) where. specifiers-

const type qualifier

Each individual type in the C type system has several qualified versions of that type, corresponding to one, two, or all three of the const, volatile, and, for pointers to object types, restrict qualifiers. This page describes the effects of the const qualifier. Objects declared with const-qualified types may be placed in read-only memory by the compiler, and if the address of a const object is never taken in a program, it may not be stored at all. const semantics apply to lvalue expressions on

wcslen

Defined in header <wchar.h> size_t wcslen( const wchar_t *str ); (1) (since C95) size_t wcsnlen_s(const wchar_t *str, size_t strsz); (2) (since C11) 1) Returns the length of a wide string, that is the number of non-null wide characters that precede the terminating null wide character. 2) Same as (1), except that the function returns zero if str is a null pointer and returns strsz if the null wide character was not found in the first strsz wide characters of src As a

volatile

Usage volatile type qualifier

thrd_exit

Defined in header <threads.h> _Noreturn void thrd_exit( int res ); (since C11) First, for every thread-specific storage key which was created with a non-null destructor and for which the associated value is non-null (see tss_create), thrd_exit sets the value associated with the key to NULL and then invokes the destructor with the previous value of the key. The order in which the destructors are invoked is unspecified. If, after this, there remain keys with both non-null des

typedef

Usage typedef declaration

abs

Defined in header <stdlib.h> int abs( int n ); long labs( long n ); long long llabs( long long n ); (since C99) Defined in header <inttypes.h> intmax_t imaxabs( intmax_t n ); (since C99) Computes the absolute value of an integer number. The behavior is undefined if the result cannot be represented by the return type. Parameters n - integer value Return value The absolute value of n (i.e. |n|), if it is representable.

Algorithms

Defined in header <stdlib.h> qsortqsort_s (C11) sorts a range of elements with unspecified type (function) bsearchbsearch_s (C11) searches an array for an element of unspecified type (function) References C11 standard (ISO/IEC 9899:2011): 7.22.5 Searching and sorting utilities (p: 354-356) K.3.6.3 Searching and sorting utilities (p: 607-609) C99 standard (ISO/IEC 9899:1999): 7.20.5 Searching and sorting utilities (p: 318-319) C89/C90 standard (ISO/IEC 9899:

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

const

Usage const type qualifier