switch statement

Executes code according to the value of an integral argument. Used where one or several out of many branches of code need to be executed according to an integral value. Syntax switch ( expression ) statement expression - any expression of integer type (char, signed or unsigned integer, or enumeration) statement - any statement (typically a compound statement). case: and default: labels are permitted in statement, and break; statement has special meaning. case constant_

tanh

Defined in header <math.h> float tanhf( float arg ); (1) (since C99) double tanh( double arg ); (2) long double tanhl( long double arg ); (3) (since C99) Defined in header <tgmath.h> #define tanh( arg ) (4) (since C99) 1-3) Computes the hyperbolic tangent of arg. 4) Type-generic macro: If the argument has type long double, tanhl is called. Otherwise, if the argument has integer type or the type double, tanh is called. Otherwise, t

tan

Defined in header <math.h> float tanf( float arg ); (1) (since C99) double tan( double arg ); (2) long double tanl( long double arg ); (3) (since C99) Defined in header <tgmath.h> #define tan( arg ) (4) (since C99) 1-3) Computes the tangent of arg (measured in radians). 4) Type-generic macro: If the argument has type long double, tanl is called. Otherwise, if the argument has integer type or the type double, tan is called. Otherwi

Struct and union initialization

When initializing an object of struct or union type, the initializer must be a non-empty, brace-enclosed, comma-separated list of initializers for the members: = { designator(optional) expression , ... } where the designator is a sequence (whitespace-separated or adjacent) of individual member designators of the form . member and array designators of the form [ index ]. All members that are not initialized explicitly are initialized implicitly the same way as objects that have static

switch

Usage switch statement: as the declaration of the statement

Struct declaration

A struct is a type consisting of a sequence of members whose storage is allocated in an ordered sequence (as opposed to union, which is a type consisting of a sequence of members whose storage overlaps). The type specifier for a struct is identical to the union type specifier except for the keyword used: Syntax struct name(optional) { struct-declaration-list } (1) struct name (2) 1) Struct definition: introduces the new type struct name and defines its meaning 2) If used o

strxfrm

Defined in header <string.h> size_t strxfrm( const char *dest, const char *src, size_t count ); (until C99) size_t strxfrm( const char *restrict dest, const char *restrict src, size_t count ); (since C99) Transforms the null-terminated byte string pointed to by src into the implementation-defined form such that comparing two transformed strings with strcmp gives the same result as comparing the original strings with

strtoimax

Defined in header <inttypes.h> intmax_t strtoimax( const char *restrict nptr, char **restrict endptr, int base ); (since C99) uintmax_t strtoumax( const char *restrict nptr, char **restrict endptr, int base ); (since C99) Interprets an integer value in a byte string pointed to by nptr. Discards any whitespace characters (as identified by calling isspace()) until the first non-whitespace character is found, then takes as many

strtoul

Defined in header <stdlib.h> unsigned long strtoul( const char *str, char **str_end, int base ); (until C99) unsigned long strtoul( const char *restrict str, char **restrict str_end, int base ); (since C99) unsigned long long strtoull( const char *restrict str, char **restrict str_end, int base ); (since C99) Interprets an unsigned integer value in

strtok

Defined in header <string.h> (1) char *strtok( char *str, const char *delim ); (until C99) char *strtok( char *restrict str, const char *restrict delim ); (since C99) char *strtok_s(char *restrict str, rsize_t *restrict strmax, const char *restrict delim, char **restrict ptr); (2) (since C11) 1) Finds the next token in a null-terminated byte string pointed to by str. The separator characters are identified by null-terminated byte string pointed to by delim