The "Unknown:"s below indicate that an entry is incomplete.
| { ... }(1) | block (grouping statements, especially when statements are not expressions) |
| nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
| \ | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
| #if 0 ... #endif | commenting (nestable) |
| /* ... */ | commenting (non nestable) |
| < > <= >= | comparison |
| strcmp | comparison (returns 3 values (i.e. inferior, equal or superior)) |
| /** ... */(2) | documentation comment (non nestable) |
| == != | equality / inequality (shallow) |
| ( ... ) | grouping expressions |
| __LINE__ __FILE__ | information about the current line and file |
| malloc | manual memory allocation (allocation) |
| free | manual memory allocation (deallocation) |
| case-sensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
| [_a-zA-Z][_a-zA-Z0-9]* | tokens (variable identifier regexp) |
| usually lowercase or underscores, ALL_CAPS for macros | tokens (what is the standard way for scrunching together multiple words) |
| = | variable assignment or declaration (assignment) |
| t v | variable assignment or declaration (declaration) |
| f(a,b,...) | function call |
| f() | function call (with no parameter) |
| typ0 f(typ1 para1, typ2 para2, ...) { ... } | function definition |
| void f(typ1 para1, typ2 para2, ...) { ... } | function definition (procedures) |
| return(3) | function return value (breaks the control flow) |
| continue / break | breaking control flow (continue / break) |
| goto | breaking control flow (goto (unconditional jump)) |
| return(3) | breaking control flow (returning a value) |
| if (c) ... | if_then |
| if (c) b1 else b2 | if_then_else |
| c ? b1 : b2 | if_then_else |
| do ... while (!c) | loop (do something until condition) |
| for | loop (for "a la C" (while + initialisation)) |
| for (int i = 10; i >= 1; i--) ... | loop (for each value in a numeric range, 1 decrement) |
| for (int i = 1; i <= 10; i++) ... | loop (for each value in a numeric range, 1 increment (see also the entries about ranges)) |
| for (int i = 1; i <= 10; i += 2) ... | loop (for each value in a numeric range, free increment) |
| while (c) ... | loop (while condition do something) |
switch (val) {
case v1: ...; break;
case v2: case v3: ...; break;
default: ...;
} | multiple selection (switch) |
| , | sequence |
| ; | sequence |
| t v | annotation (or variable declaration) |
| (t) e | cast (upcast) |
| typedef t n | declaration |
| mutability is the default | mutability, constness (type of a mutable value) |
| s[n] | accessing n-th character |
| (char) c | ascii to character |
| 'z' | character "z" |
| (int) c | character to ascii |
| char | character type name |
| strndup(s + n, len) | extract a substring |
| strstr strchr | locate a substring |
| strrchr | locate a substring (starting at the end) |
"...\n" "...\n" | multi-line |
| puts | simple print (on strings) |
| printf | simple print (printf-like) |
| sprintf | sprintf-like |
| strcat | string concatenation |
| strcmp | string equality & inequality |
| strlen | string size |
| "\n" | strings (end-of-line (without writing the real CR or LF character)) |
| "..." | strings (with no interpolation of variables) |
| char[] | type name |
| toupper / tolower | upper / lower case character |
| NULL | false value |
| 0(4) | false value |
| '\0' | false value |
| ! | logical not |
| || / && | logical or / and (short circuit) |
| anything not false | true value |
| { a, b, c }(5) | list constructor |
| a[i] | list/array indexing |
| enum typ { n1; n2; ... }(6) | enumerated type declaration |
| NULL | optional value (null value) |
| *v(7) | optional value (value) |
| . | record (selector) |
| -> | record (selector) |
| struct { typ1 n1; typ2 n2; ... } | record (type declaration) |
| & | reference (pointer) (creation) |
| *(8) | reference (pointer) (dereference) |
| ->(9) | reference (pointer) (dereference) |
| union { typ1 n1; typ2 n2; ... } | union type declaration |
Unknown:
optional value (null coalescing)
| + / - / * / / | addition / subtraction / multiplication / division |
| & / | / ^ | bitwise operators (and / or / xor) |
| ~ | bitwise operators (bitwise inversion) |
| << / >> | bitwise operators (left shift / right shift / unsigned right shift) |
| div ldiv lldiv | euclidean division (both quotient and modulo) |
| pow | exponentiation (power) |
| log10 | logarithm (base 10) |
| frexp | logarithm (base 2) |
| log | logarithm (base e) |
| % | modulo (modulo of -3 / 2 is -1) |
| - | negation |
| 1000., 1E3 | numbers syntax (floating point) |
| 07, 0xf | numbers syntax (integers in base 2, octal and hexadecimal) |
| 1000 | numbers syntax (integers) |
| mathematical | operator priorities and associativities (addition vs multiplication) |
| rand | random (random number) |
| srand | random (seed the pseudo random generator) |
| sqrt / exp / abs | square root / e-exponential / absolute value |
| sin / cos / tan | trigonometry (basic) |
| asin / acos / atan(10) | trigonometry (inverse) |
| trunc / round / floor / ceil | truncate / round / floor / ceil |
| float, double, long double | type name (floating point) |
| short, int, long | type name (integers) |
