Escape sequences

Escape sequences are used to represent certain special characters within string literals and character constants. The following escape sequences are available. ISO C requires a diagnostic if the backslash is followed by any character not listed here: Escape sequence Description Representation \' single quote byte 0x27 (in ASCII encoding) \" double quote byte 0x22 (in ASCII encoding) \? question mark byte 0x3f (in ASCII encoding) \\ backslash byte 0x5c (in ASCII enco

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

Error numbers

Each of the macros defined in <errno.h> expands to an integer constant expression with type int and with a unique positive value. The following constants are defined (the implementation may define more, as long as they begin with 'E' followed by digits or uppercase letters). Defined in header <errno.h> EDOM Mathematics argument out of domain of function (macro constant) EILSEQ (C95) Illegal byte sequence (macro constant) ERANGE Result too large (macro constant)

errno

Defined in header <errno.h> #define errno /*implementation-defined*/ errno is a preprocessor macro that expands to a thread-local (since C11) modifiable lvalue of type int. Several standard library functions indicate errors by writing positive integers to errno. Typically, the value of errno is set to one of the error codes listed in <errno.h> as macro constants beginning with the letter E followed by uppercase letters or digits. The value of errno is ​0​ at program s

double

Usage double type: as the declaration of the type

do-while loop

Executes a statement repeatedly until the value of condition becomes false. The test takes place after each iteration. Syntax do statement while ( expression ) ; expression - any expression of scalar type. This expression is evaluated after each iteration, and if it compares equal to zero, the loop is exited. statement - any statement, typically a compound statement, which is the body of the loop Explanation A do-while statement causes the statement (also called the

enum

Usage declaration of an enumeration type

else

Usage if statement: as the declaration of the alternative branch

Enumerations

An enumerated type is a distinct type whose value is restricted to one of several explicitly named constants (enumeration constants). Syntax Enumerated type is declared using the following enumeration specifier as the type specifier in the declaration grammar: enum identifier(optional) { enumerator-list } where enumerator-list is a comma-separated list (with trailing comma permitted) (since C99) of enumerators, each of which has the form: enumerator (1) enumerator = constant-e

erfc

Defined in header <math.h> float erfcf( float arg ); (1) (since C99) double erfc( double arg ); (2) (since C99) long double erfcl( long double arg ); (3) (since C99) Defined in header <tgmath.h> #define erfc( arg ) (4) (since C99) 1-3) Computes the complementary error function of arg, that is 1.0-erf(arg), but without loss of precision for large arg. 4) Type-generic macro: If arg has type long double, erfcl is called. Otherwise, i