wscanf

Defined in header <wchar.h> int wscanf( const wchar_t *format, ... ); (1) (since C95) int fwscanf( FILE *stream, const wchar_t *format, ... ); (2) (since C95) int swscanf( const wchar_t *buffer, const wchar_t *format, ... ); (3) (since C95) int wscanf_s( const wchar_t *restrict format, ...); (4) (since C11) int fwscanf_s( FILE *restrict stream, const wchar_t *restrict format, ...); (5) (since C11) int swscanf_s( const wchar_t *restrict

Lifetime

Every object in C exists, has a constant address, retains its last-stored value (except when the value is indeterminate), and, for VLA, retains its size (since C99) over a portion of program execution known as this object's lifetime. For the objects that are declared with automatic, static, and thread storage duration, lifetime equals their storage duration (note the difference between non-VLA and VLA automatic storage duration). For the objects with allocated storage duration, the lifetime beg

strtof

Defined in header <stdlib.h> float strtof( const char *restrict str, char **restrict str_end ); (since C99) double strtod( const char *str, char **str_end ); (until C99) double strtod( const char *restrict str, char **restrict str_end ); (since C99) long double strtold( const char *restrict str, char **restrict str_end ); (since C99) Interprets a floating point value in a byte string pointed to by str. Function discards an

memset

Defined in header <string.h> void *memset( void *dest, int ch, size_t count ); (1) errno_t memset_s( void *dest, rsize_t destsz, int ch, rsize_t count ) (2) (since C11) 1) Copies the value ch (after conversion to unsigned char as if by (unsigned char)ch) into each of the first count characters of the object pointed to by dest. The behavior is undefined if access occurs beyond the end of the dest array. The behavior is undefined if dest is a null pointer. 2) Same a

iswpunct

Defined in header <wctype.h> int iswpunct( wint_t ch ); (since C95) Checks if the given wide character is a punctuation character, i.e. it is one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ or any punctuation character specific to the current locale. Parameters ch - wide character Return value Non-zero value if the wide character is a punctuation character, zero otherwise. Example #include <stdio.h> #include <wchar.h> #include <wctype.h&g

Variadic arguments

Variadic functions are functions that may be called with different number of arguments. Only new-style (prototyped) function declarations may be variadic. This is indicated by the parameter of the form ... which must appear last in the parameter list and must follow at least one named parameter. //New-style declaration int printx(const char* fmt, ...); // function declared this way printx("hello world"); // may be called with one printx("a=%d b=%d", a, b); // or more arguments // int printy(.

iswcntrl

Defined in header <wctype.h> int iswcntrl( wint_t ch ); (since C95) Checks if the given wide character is a control character, i.e. codes 0x00-0x1F and 0x7F and any control characters specific to the current locale. Parameters ch - wide character Return value Non-zero value if the wide character is a control character, zero otherwise. Example #include <stdio.h> #include <wchar.h> #include <wctype.h> #include <locale.h> int main(v

Union declaration

A union is a type consisting of a sequence of members whose storage overlaps (as opposed to struct, which is a type consisting of a sequence of members whose storage is allocated in an ordered sequence). The value of at most one of the members can be stored in a union at any one time. The type specifier for a union is identical to the struct type specifier except for the keyword used: Syntax union name(optional) { struct-declaration-list } (1) union name (2) name - the

wctomb

Defined in header <stdlib.h> int wctomb( char *s, wchar_t wc ); (1) errno_t wctomb_s(int *restrict status, char *restrict s, rsize_t ssz, wchar_t wc); (2) (since C11) 1) Converts a wide character wc to multibyte encoding and stores it (including any shift sequences) in the char array whose first element is pointed to by s. No more than MB_CUR_MAX characters are stored. If wc is the null character, the null byte is written to s, preceded by any shift sequences neces

Assignment operators

Assignment and compound assignment operators are binary operators that modify the variable to their left using the value to their right. Operator Operator name Example Description Equivalent of = basic assignment a = b a becomes equal to b N/A += addition assignment a += b a becomes equal to the addition of a and b a = a + b -= subtraction assignment a -= b a becomes equal to the subtraction of b from a a = a - b *= multiplication assignment a *= b