Programming Symbols: Complete Reference
1. ARITHMETIC OPERATORS
| Symbol |
Name |
Operation |
Example |
Result |
+ |
Plus |
Addition |
5 + 3 |
8 |
- |
Minus |
Subtraction |
5 - 3 |
2 |
* |
Asterisk |
Multiplication |
5 * 3 |
15 |
/ |
Slash |
Division |
6 / 2 |
3 |
% |
Percent |
Modulo (remainder) |
7 % 3 |
1 |
++ |
Double plus |
Increment |
x++ or ++x |
x + 1 |
-- |
Double minus |
Decrement |
x-- or --x |
x - 1 |
** |
Double asterisk |
Power (Python, JS) |
2 ** 3 |
8 |
// |
Double slash |
Integer division (Python) |
7 // 2 |
3 |
2. COMPARISON/RELATIONAL OPERATORS
| Symbol |
Name |
Comparison |
Example |
Result |
== |
Double equals |
Equal to |
5 == 5 |
true |
!= |
Bang equals |
Not equal |
5 != 3 |
true |
> |
Greater than |
Greater than |
5 > 3 |
true |
< |
Less than |
Less than |
5 < 3 |
false |
>= |
Greater or equal |
Greater or equal |
5 >= 5 |
true |
<= |
Less or equal |
Less or equal |
5 <= 3 |
false |
=== |
Triple equals |
Strict equal (JS) |
5 === "5" |
false |
!== |
Bang bang equals |
Strict not equal (JS) |
5 !== "5" |
true |
<> |
Diamond (deprecated) |
Not equal (old SQL) |
5 <> 3 |
true |
3. LOGICAL OPERATORS
| Symbol |
Name |
Operation |
Example |
Result |
&& |
Double ampersand |
Logical AND |
true && false |
false |
| `\ |
\ |
` |
Double pipe |
Logical OR |
! |
Exclamation |
Logical NOT |
!true |
false |
and |
Keyword AND (Python) |
Logical AND |
True and False |
False |
or |
Keyword OR (Python) |
Logical OR |
True or False |
True |
not |
Keyword NOT (Python) |
Logical NOT |
not True |
False |
4. BITWISE OPERATORS
| Symbol |
Name |
Operation |
Example |
Result |
& |
Ampersand |
Bitwise AND |
5 & 3 |
1 (0101 & 0011) |
| `\ |
` |
Pipe |
Bitwise OR |
`5 \ |
^ |
Caret |
Bitwise XOR |
5 ^ 3 |
6 (0101 ^ 0011) |
~ |
Tilde |
Bitwise NOT |
~5 |
-6 (inverts bits) |
<< |
Double less-than |
Left shift |
5 << 1 |
10 (0101 << 1) |
>> |
Double greater-than |
Right shift |
5 >> 1 |
2 (0101 >> 1) |
>>> |
Triple greater-than |
Unsigned right shift (JS) |
5 >>> 1 |
2 |
5. ASSIGNMENT OPERATORS
| Symbol |
Name |
Operation |
Equivalent |
Example |
= |
Equals |
Assignment |
— |
x = 5; |
+= |
Plus-equals |
Add & assign |
x = x + 5 |
x += 5; |
-= |
Minus-equals |
Subtract & assign |
x = x - 5 |
x -= 5; |
*= |
Multiply-equals |
Multiply & assign |
x = x * 5 |
x *= 5; |
/= |
Divide-equals |
Divide & assign |
x = x / 5 |
x /= 5; |
%= |
Modulo-equals |
Modulo & assign |
x = x % 5 |
x %= 5; |
&= |
AND-equals |
Bitwise AND & assign |
x = x & 5 |
x &= 5; |
| `\ |
=` |
OR-equals |
Bitwise OR & assign |
`x = x \ |
^= |
XOR-equals |
Bitwise XOR & assign |
x = x ^ 5 |
x ^= 5; |
<<= |
Left-shift-equals |
Left shift & assign |
x = x << 2 |
x <<= 2; |
>>= |
Right-shift-equals |
Right shift & assign |
x = x >> 2 |
x >>= 2; |
**= |
Power-equals (Python) |
Power & assign |
x = x ** 2 |
x **= 2; |
//= |
Floor-divide-equals (Python) |
Floor divide & assign |
x = x // 2 |
x //= 2; |
6. DELIMITERS & PUNCTUATION
| Symbol |
Name |
Use |
Example |
( ) |
Parentheses |
Function calls, grouping |
func(x, y) |
[ ] |
Square brackets |
Array indexing |
arr[0] |
{ } |
Curly braces |
Code blocks, dictionaries |
{ statement; } |
; |
Semicolon |
Statement terminator |
int x = 5; |
, |
Comma |
Parameter/list separator |
func(a, b, c) |
. |
Period/dot |
Member access |
obj.property |
-> |
Arrow |
Pointer member access |
ptr->field (C) |
:: |
Double colon |
Scope resolution |
std::cout (C++) |
: |
Colon |
Labels, ternary, slicing |
label: x = (a) ? b : c |
? |
Question mark |
Ternary operator |
(cond) ? true_val : false_val |
& |
Ampersand |
Address-of (C) |
&variable |
* |
Asterisk |
Dereference (C) |
*pointer |
... |
Ellipsis |
Variadic arguments |
func(int ...args) |
@ |
At-sign |
Decorator (Python) |
@decorator |
# |
Hash |
Preprocessor (C), comment (Python) |
#include, # comment |
$ |
Dollar |
Variables (PHP), templates |
$variable |
` |
Backtick |
Template literals (JS) |
`Hello ${name}` |
\ |
Backslash |
Escape character |
"He said \"Hi\"" |
7. SPECIAL SYMBOLS
| Symbol |
Name |
Purpose |
Example |
| ` |
` |
Pipe |
Bitwise OR, piping (shell) |
~ |
Tilde |
Home directory (shell), NOT (bitwise) |
~/Documents |
` |
Backtick |
Command execution (shell) |
`date` |
' |
Single quote |
String literal (no interpolation) |
'hello' |
" |
Double quote |
String literal (with interpolation) |
"hello" |
` |
Backtick |
Template string (JavaScript) |
`Hello ${name}` |
=> |
Fat arrow |
Arrow function (JS, Java) |
(x) => x * 2 |
-> |
Thin arrow |
Lambda (Python) |
lambda x: x * 2 |
:= |
Walrus |
Assign & return (Python 3.8+) |
if (n := len(a)) > 10 |
** |
Double asterisk |
Unpacking (Python) |
func(**kwargs) |
* |
Asterisk |
Unpacking (Python) |
func(*args) |
?? |
Null coalescing (JS) |
Default if null/undefined |
value ?? "default" |
?. |
Optional chaining (JS) |
Safe property access |
obj?.prop?.field |
8. MATHEMATICAL SYMBOLS
| Symbol |
Meaning |
Example |
∑ |
Summation |
Mathematical notation |
∏ |
Product |
Mathematical notation |
∞ |
Infinity |
float infinity = 1.0 / 0.0; |
± |
Plus-minus |
Mathematical notation |
≈ |
Approximately equal |
Floating-point comparison |
≠ |
Not equal |
Mathematical; use != in code |
≤ |
Less than or equal |
Mathematical; use <= in code |
≥ |
Greater than or equal |
Mathematical; use >= in code |
√ |
Square root |
Mathematical notation |
π |
Pi |
M_PI in C math library |
9. OPERATOR PRECEDENCE (Highest to Lowest)
1. () [] . -> (Grouping, array access, member access)
2. ! ~ + - ++ -- * & (Logical NOT, bitwise NOT, unary, increment)
3. * / % (Multiplication, division, modulo)
4. + - (Addition, subtraction)
5. << >> (Bit shifts)
6. < <= > >= (Relational)
7. == != (Equality)
8. & (Bitwise AND)
9. ^ (Bitwise XOR)
10. | (Bitwise OR)
11. && (Logical AND)
12. || (Logical OR)
13. ? : (Ternary)
14. = += -= *= /= %= (Assignment)
15. , (Comma)
10. SYMBOLS BY LANGUAGE FAMILY
C/C++/Java/JavaScript:
+ - * / % ++ -- = == != < > <= >= && || ! & | ^ ~ << >> sizeof
Python-specific:
** // := @ // (floor division) and or not
JavaScript-specific:
=> ?? ?. === !== ** async await
Shell/Unix:
11. ESCAPE SEQUENCES
| Escape |
Represents |
Example |
\\ |
Backslash |
"C:\\Users\\John" |
\" |
Double quote |
"He said \"Hi\"" |
\' |
Single quote |
'It\'s me' |
\n |
Newline |
"Line 1\nLine 2" |
\t |
Tab |
"Col1\tCol2" |
\r |
Carriage return |
"Text\r" |
\b |
Backspace |
"Back\bspace" |
\f |
Form feed |
"Page\f" |
\0 |
Null character |
'\0' |
\x |
Hex character |
"\x41" → 'A' |
\u |
Unicode |
"\u0041" → 'A' |
12. COMMENT SYMBOLS
| Language |
Single-line |
Multi-line |
Example |
| C/C++/Java/JS |
// |
/* ... */ |
// comment |
| Python |
# |
''' ... ''' or """ ... """ |
# comment |
| HTML |
— |
<!-- ... --> |
<!-- comment --> |
| SQL |
-- |
/* ... */ |
-- comment |
| Shell |
# |
— |
# comment |
13. OPERATOR SYMBOLS COMPARISON TABLE
╔════════════════╦═══════╦════════╦═══════╦════════════╗
║ Operation ║ C ║ Python ║ Java ║ JavaScript ║
╠════════════════╬═══════╬════════╬═══════╬════════════╣
║ Power ║ pow() ║ ** ║ pow() ║ ** ║
║ Floor divide ║ / ║ // ║ / ║ Math ║
║ Modulo ║ % ║ % ║ % ║ % ║
║ Bitwise NOT ║ ~ ║ ~ ║ ~ ║ ~ ║
║ Left shift ║ << ║ << ║ << ║ << ║
║ Right shift ║ >> ║ >> ║ >> ║ >> ║
║ Arrow function ║ — ║ -> ║ — ║ => ║
╚════════════════╩═══════╩════════╩═══════╩════════════╝
14. REGEX SPECIAL CHARACTERS
| Symbol |
Meaning |
Example |
. |
Any character |
a.c matches "abc", "adc" |
* |
0 or more |
ab*c matches "ac", "abc", "abbc" |
+ |
1 or more |
ab+c matches "abc", "abbc" |
? |
0 or 1 |
ab?c matches "ac", "abc" |
^ |
Start of line |
^start matches line beginning |
$ |
End of line |
end$ matches line ending |
[ ] |
Character class |
[abc] matches a, b, or c |
[^ ] |
Negated class |
[^abc] matches anything but a, b, c |
( ) |
Group |
(ab)+ matches "ab", "abab" |
| `\ |
` |
Alternation |
\ |
Escape |
\$ matches literal "$" |
Would you like me to create:
- Interactive symbol reference (searchable artifact)?
- Operator precedence chart (visual)?
- Symbol usage by language (comparative table)?
- Regex patterns guide (with examples)?