Programming Symbols: Names and Meanings
Symbol Name Meaning / Use Example
+ Plus sign Addition a+b
- Minus sign Subtraction or negative sign a - b, -a
* Asterisk Multiplication or pointer (C) a * b, int *ptr
/ Forward slash Division a/b
% Percent sign Modulus (remainder) a%b
= Equals sign Assignment x = 10
== Double equals Equality check x == y
!= Not equals Inequality check x != y
> Greater than Comparison x>y
< Less than Comparison x<y
>= Greater than or equal Comparison x >= y
<= Less than or equal Comparison x <= y
&& Double ampersand Logical AND (C-style) a && b
|| Double pipe Logical OR (C-style) a || b
! Exclamation mark Logical NOT !a
& Ampersand Bitwise AND / Address-of a & b, &x
| Pipe Bitwise OR a|b
^ Caret Bitwise XOR a^b
~ Tilde Bitwise NOT ~a
<< Left shift Bitwise shift a << 2
>> Right shift Bitwise shift a >> 2
+= Plus-equals Add and assign a += 1
-= Minus-equals Subtract and assign a -= 1
*= Multiply-equals Multiply and assign a *= 2
/= Divide-equals Divide and assign a /= 2
() Parentheses Grouping or function call func(x)
{} Curly braces Code block { doSomething(); }
[] Square brackets Indexing, arrays arr[0]
; Semicolon Statement terminator int x = 0;
: Colon Block starter (Python), type hints if x:, x: int
, Comma Separator a, b = 1, 2
. Dot / Period Property/method access obj.prop
-> Arrow operator Lambda (C++, JS), pointer access a->b, x => y
:: Scope resolution C++ / Java method reference std::cout, A::f
=> Fat arrow Lambda (JavaScript, Dart) x => x * 2
... Ellipsis Varargs / spread / rest ...args
# Hash / Octothorpe Comments (Python), macros (C) # comment
// Double slash Single-line comment (C, JS) // comment
/* */ Slash-star Multi-line comment (C-style) /* comment */
@ At symbol Decorator, annotation @Override
$ Dollar sign Variable (PHP, Bash), interpolation $var, "$name"
? Question mark Ternary operator condition a?b:c
\ Backslash Escape character \n, \t
|> Pipe operator Function chaining (Elixir, F#) val |> func()