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

Member access operators

Member access operators allow access to the members of their operands. Operator Operator name Example Description [] array subscript a[b] access the bth element of array a * pointer dereference *a dereference the pointer a to access the object or function it refers to & address of &a create a pointer that refers to the object or function a . member access a.b access member b of struct or union a -> member access through pointer a->b a

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​

signed

Usage signed type modifier

atomic_init

Defined in header <stdatomic.h> void atomic_init( volatile A* obj, C desired ); (since C11) Initializes the default-constructed atomic object object with the value desired. The function is not atomic: concurrent access from another thread, even through an atomic operation, is a data race. This is a generic function defined for all atomic object types A. The argument is pointer to a volatile atomic type to accept addresses of both non-volatile and volatile (e.g. memory-mappe

for loop

Executes a loop. Used as a shorter equivalent of while loop. Syntax for ( init_clause ; cond_expression ; iteration_expression ) loop_statement Explanation Behaves as follows: init_clause may be an expression or a declaration If it is an expression, it is evaluated once, before the first evaluation of cond_expression and its result is discarded. (C99) If it is a declaration, it is in scope in the entire loop body, including the remainder of init_clause, the entire cond_express

iswlower

Defined in header <wctype.h> int iswlower( wint_t ch ); (since C95) Checks if the given wide character is a lowercase letter, i.e. one of abcdefghijklmnopqrstuvwxyz or any lowercase letter specific to the current locale. Parameters ch - wide character Return value Non-zero value if the wide character is an lowercase letter, zero otherwise. Example #include <stdio.h> #include <wchar.h> #include <wctype.h> #include <locale.h> int m

void

Usage void type: as the declaration of the incomplete type void: in a function with no parameter or no return value

atof

Defined in header <stdlib.h> double atof( const char* str ); Interprets an floating point value in a byte string pointed to by str. Function discards any whitespace characters (as determined by std::isspace()) until first non-whitespace character is found. Then it takes as many characters as possible to form a valid floating point representation and converts them to floating point value. The valid floating point value can be one of the following: decimal floating point expr

wcsxfrm

Defined in header <wchar.h> size_t wcsxfrm( const wchar_t* dest, const wchar_t* src, size_t count ); (until C99) (since C95) size_t wcsxfrm( const wchar_t* restrict dest, const wchar_t* restrict src, size_t count ); (since C99) Transforms the null-terminated wide string pointed to by src into the implementation-defined form such that comparing two transformed strings with wcscmp gives the same result as comparing the original strings with wcscoll, in the current C loc