Pseudo-random number generation

Defined in header <stdlib.h> rand generates a pseudo-random number (function) srand seeds pseudo-random number generator (function) RAND_MAX maximum possible value generated by rand() (macro constant) References C11 standard (ISO/IEC 9899:2011): 7.22.2 Pseudo-random sequence generation functions (p: 346-347) C99 standard (ISO/IEC 9899:1999): 7.20.2 Pseudo-random sequence generation functions (p: 312-313) C89/C90 standard (ISO/IEC 9899:1990): 4.10.2 Pseudo-ra

ispunct

Defined in header <ctype.h> int ispunct( int ch ); Checks if the given character is a punctuation character in the current C locale. The default C locale classifies the characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ as punctuation. The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF. Parameters ch - character to classify Return value Non-zero value if the character is a punctuation character, zero o

atomic_flag_clear

Defined in header <stdatomic.h> void atomic_flag_clear( volatile atomic_flag* obj ); (1) (since C11) void atomic_flag_clear_explicit( volatile atomic_flag* obj, memory_order order ); (2) (since C11) Atomically changes the state of a atomic_flag pointed to by obj to clear (false). The first version orders memory accesses according to memory_order_seq_cst, the second version orders memory accesses according to order. The argument is pointer to a volatile atomic flag to

memchr

Defined in header <string.h> void* memchr( const void* ptr, int ch, size_t count ); Finds the first occurrence of ch (after conversion to unsigned char as if by (unsigned char)ch) in the initial count characters (each interpreted as unsigned char) of the object pointed to by ptr. The behavior is undefined if access occurs beyond the end of the array searched. The behavior is undefined if ptr is a null pointer. Parameters ptr - pointer to the object to be examined

strstr

Defined in header <string.h> char *strstr( const char* str, const char* substr ); Finds the first occurrence of the null-terminated byte string pointed to by substr in the null-terminated byte string pointed to by str. The terminating null characters are not compared. The behavior is undefined if either str or substr is not a pointer to a null-terminated byte string. Parameters str - pointer to the null-terminated byte string to examine substr - pointer to the

perror

Defined in header <stdio.h> void perror( const char *s ); Prints to stderr the contents of the null-terminated character string pointed to by s (unless s is a null pointer), followed by the two characters ": ", followed by the implementation-defined error message describing the error code currently stored in the system variable errno (identical to the output of strerror(errno)), followed by '\n'. Parameters s - pointer to a null-terminated string with explanatory me

raise

Defined in header <signal.h> int raise( int sig ); Sends signal sig to the program. The signal handler, specified using signal(), is invoked. If the user-defined signal handling strategy is not set using signal() yet, it is implementation-defined whether the signal will be ignored or default handler will be invoked. Parameters sig - the signal to be sent. It can be an implementation-defined value or one of the following values: SIGABRTSIGFPESIGILLSIGINTSIGSEGVSIGT

bsearch

Defined in header <stdlib.h> void* bsearch( const void *key, const void *ptr, size_t count, size_t size, int (*comp)(const void*, const void*) ); (1) void* bsearch_s( const void *key, const void *ptr, rsize_t count, rsize_t size, int (*comp)(const void *, const void *, void *), void *context ); (2) (since C11) 1) Finds an element equal to element pointed to by key in an array pointed to by ptr. The array contains count

volatile

Usage volatile type qualifier

va_start

Defined in header <stdarg.h> void va_start( va_list ap, parmN ); The va_start macro enables access to the variable arguments following the named argument parmN. va_start should be invoked with an instance to a valid va_list object ap before any calls to va_arg. If parmN is declared with register storage class specifier, with an array type, with a function type, or with a type not compatible with the type that results from default argument promotions, the behavior is undefin