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

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",

getenv

Defined in header <stdlib.h> char *getenv( const char *name ); (1) errno_t getenv_s( size_t *restrict len, char *restrict value, rsize_t valuesz, const char *restrict name ); (2) (since C11) 1) Searches for an environmental variable with name name in the host-specified environment list and returns a pointer to the string that is associated with the matched environment variable. The set of environmental variables and methods of altering it are implem

casinhf

Defined in header <complex.h> float complex casinhf( float complex z ); (1) (since C99) double complex casinh( double complex z ); (2) (since C99) long double complex casinhl( long double complex z ); (3) (since C99) Defined in header <tgmath.h> #define asinh( z ) (4) (since C99) 1-3) Computes the complex arc hyperbolic sine of z with branch cuts outside the interval [−i; +i] along the imaginary axis. 4) Type-generic macro: If z h

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

Other operators

A collection of operators that do not fit into any of the other major categories. Operator Operator name Example Description (...) function call f(...) call the function f(), with zero or more arguments , comma operator a, b evaluate expression a, disregard its return value and complete any side-effects, then evaluate expression b, returning the type and the result of this evaluation (type) type cast (type)a cast the type of a to type ? : conditional operator

iswgraph

Defined in header <wctype.h> int iswgraph( wint_t ch ); (since C95) Checks if the given wide character has a graphical representation, i.e. it is either a number (0123456789), an uppercase letter (ABCDEFGHIJKLMNOPQRSTUVWXYZ), a lowercase letter (abcdefghijklmnopqrstuvwxyz), a punctuation character(!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) or any graphical character specific to the current C locale. Parameters ch - wide character Return value Non-zero value i

Comments

Comments serve as a sort of in-code documentation. When inserted into a program, they are effectively ignored by the compiler; they are solely intended to be used as notes by the humans that read source code. Syntax /* comment */ (1) // comment\n (2) (since C99) 1) Often known as "C-style" or "multi-line" comments. 2) Often known as "C++-style" or "single-line" comments. All comments are removed from the program at translation phase 3 by replacing each comment with a single w

#line directive

Changes the current line number and file name in the preprocessor. Syntax #line lineno (1) #line lineno "filename" (2) Explanation 1) Changes the current preprocessor line number to lineno. Occurrences of the macro __LINE__ beyond this point will expand to lineno plus the number of actual source code lines encountered since. 2) Also changes the current preprocessor file name to filename. Occurrences of the macro __FILE__ beyond this point will produce filename. Any preproc

isblank

Defined in header <ctype.h> int isblank( int ch ); (since C99) Checks if the given character is a blank character in the current C locale. In the default C locale, only space (0x20) and horizontal tab (0x09) are classified as blank. 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 blank character, zero otherwise.