time_t

Defined in header <time.h> typedef /* unspecified */ time_t; Arithmetic (until C11) Real (since C11) type capable of representing times. Although not defined by the C standard, this is almost always an integral value holding the number of seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC, corresponding to POSIX time. Notes The standard uses the term calendar time when referring to a value of type time_t. Example Show the start of the epoch. #include &l

atanh

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

strftime

Defined in header <time.h> size_t strftime( char * str, size_t count, const char * format, const struct tm * time ); (until C99) size_t strftime( char *restrict str, size_t count, const char *restrict format, const struct tm *restrict time ); (since C99) Converts the date and time information from a given calendar time time to a null-terminated multibyte character string str according to format string format.

fgetws

Defined in header <wchar.h> wchar_t *fgetws( wchar_t *str, int count, FILE *stream ); (since C95) Reads at most count - 1 wide characters from the given file stream and stores them in str. The produced wide string is always null-terminated. Parsing stops if end-of-file occurs or a newline wide character is found, in which case str will contain that wide newline character. Parameters str - wide string to read the characters to count - the length of str stream

wmemset

Defined in header <wchar.h> wchar_t *wmemset( wchar_t *dest, wchar_t ch, size_t count ); (since C95) Copies the wide character ch into each of the first count wide characters of the wide character array (or integer array of compatible type) pointed to by dest. If overflow occurs, the behavior is undefined. If count is zero, the function does nothing. Parameters dest - pointer to the wide character array to fill ch - fill wide character count - number of

ungetc

Defined in header <stdio.h> int ungetc( int ch, FILE *stream ); Puts the character ch back to the given file stream. Parameters ch - character to be put back stream - file stream to put the character back to Return value On success ch is returned. On failure EOF is returned and the given stream remains unchanged. Example ungetc with error checking. #include <stdio.h> #include <stdlib.h> int main(void) { FILE* fp = fopen("test.txt",

c16rtomb

Defined in header <uchar.h> size_t c16rtomb( char* s, char16_t c16, mbstate_t* ps ); (since C11) Converts a 16-bit wide character to narrow multibyte character. If s is not a null pointer, the function determines the number of bytes necessary to store the multibyte character representation of c16 (including any shift sequences), and stores the multibyte character representation in the character array whose first element is pointed to by s. At most MB_CUR_MAX bytes can be wr

Error handling

Error numbers Defined in header <errno.h> errno macro which expands to POSIX-compatible thread-local error number variable(macro variable) E2BIG, EACCES, ..., EXDEV macros for standard POSIX-compatible error conditions (macro constant) Assertions Defined in header <assert.h> assert aborts the program if the user-specified condition is not true. May be disabled for release builds (function macro) static_assert (C11) issues a compile-time diagnostic

iscntrl

Defined in header <ctype.h> int iscntrl( int ch ); Checks if the given character is a control character, i.e. codes 0x00-0x1F and 0x7F. 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 control character, zero otherwise. Example #include <stdio.h> #include <ctype.h> #include <locale.h> int ma

fegetenv

Defined in header <<fenv.h>> int fegetenv( fenv_t* envp ); (1) (since C99) int fesetenv( const fenv_t* envp ); (2) (since C99) 1) Attempts to store the status of the floating-point environment in the object pointed to by envp. 2) Attempts to establish the floating-point environment from the object pointed to by envp. The value of that object must be previously obtained by a call to feholdexcept or fegetenv or be a floating-point macro constant. If any of the flo