floating constant

Allows values of floating type to be used directly in expressions. Syntax A floating constant is a non-lvalue expression having the form: significand exponent(optional) suffix(optional) Where the significand has the form. whole-number(optional) .(optional) fraction(optional) The exponent has the form. e | E exponent-sign(optional) digit-sequence (1) p | P exponent-sign(optional) digit-sequence (2) (since C99) 1) The exponent syntax for a decimal floating-point

Program support utilities

Program termination The following functions manage program termination and resource cleanup. Defined in header <stdlib.h> abort causes abnormal program termination (without cleaning up) (function) exit causes normal program termination with cleaning up (function) quick_exit (C11) causes normal program termination without completely cleaning up (function) _Exit (C99) causes normal program termination without cleaning up (function) atexit registers a functi

asctime

Defined in header <time.h> char* asctime( const struct tm* time_ptr ); (1) errno_t asctime_s(char *buf, rsize_t bufsz, const struct tm *time_ptr); (2) (since C11) 1) Converts given calendar time tm to a textual representation of the following fixed 25-character form: Www Mmm dd hh:mm:ss yyyy\n Www - three-letter English abbreviated day of the week from time_ptr->tm_wday, one of Mon, Tue, Wed, Thu, Fri, Sat, Sun. Mmm - three-letter English abbreviated month name

nearbyint

Defined in header <math.h> float nearbyintf( float arg ); (1) (since C99) double nearbyint( double arg ); (2) (since C99) long double nearbyintl( long double arg ); (3) (since C99) Defined in header <tgmath.h> #define nearbyint( arg ) (4) (since C99) 1-3) Rounds the floating-point argument arg to an integer value in floating-point format, using the current rounding mode. 4) Type-generic macro: If arg has type long double, nearbyin

lconv

Defined in header <locale.h> struct lconv; The struct lconv contains numeric and monetary formatting rules as defined by a C locale. Objects of this struct may be obtained with localeconv. The members of lconv are values of type char and of type char*. Each char* member except decimal_point may be pointing at a null character (that is, at an empty C-string). The members of type char are all non-negative numbers, any of which may be CHAR_MAX if the corresponding value is not

Common mathematical functions

Functions Defined in header <stdlib.h> abslabsllabs (C99) computes absolute value of an integral value (|x|) (function) divldivlldiv (C99) computes quotient and remainder of integer division (function) Defined in header <inttypes.h> imaxabs (C99) computes absolute value of an integral value (|x|) (function) imaxdiv (C99) computes quotient and remainder of integer division (function) Defined in header <math.h> Basic operations fa

wcstok

Defined in header <wchar.h> (1) wchar_t* wcstok( wchar_t* str, const wchar_t* delim, wchar_t **ptr ); (since C95) (until C99) wchar_t *wcstok(wchar_t * restrict str, const wchar_t * restrict delim, wchar_t **restrict ptr); (since C99) wchar_t *wcstok_s( wchar_t *restrict str, rsize_t *restrict strmax, const wchar_t *restrict delim, wchar_t **restrict ptr); (2) (since C11) 1) Finds the next token in a null-terminated wide strin

Null-terminated multibyte strings

A null-terminated multibyte string (NTMBS), or "multibyte string", is a sequence of nonzero bytes followed by a byte with value zero (the terminating null character). Each character stored in the string may occupy more than one byte. The encoding used to represent characters in a multibyte character string is locale-specific: it may be UTF-8, GB18030, EUC-JP, Shift-JIS, etc. For example, the char array {'\xe4','\xbd','\xa0','\xe5','\xa5','\xbd','\0'} is an NTMBS holding the string "你好" in UTF-8

Implicit conversions

When an expression is used in the context where a value of a different type is expected, conversion may occur: int n = 1L; // expression 1L has type long, int is expected n = 2.1; // expression 2.1 has type double, int is expected char *p = malloc(10); // expression malloc(10) has type void*, char* is expected Conversions take place in the following situations: Conversion as if by assignment In the assignment operator, the value of the right-hand operand is converted to the unqualified type

wcstoimax

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