Symbols and Brackets Used in Coding
Here’s are the types of brackets and symbols commonly used in programming languages.
1. Brackets
| Symbol |
Name |
Use Case Examples |
| ( ) |
Round brackets |
Function calls, expressions, control flow if (x) |
| { } |
Curly brackets |
Code blocks { ... }, object literals |
| [ ] |
Square brackets |
Arrays arr[0], indexing, lists |
| < > |
Angle brackets |
Templates <T>, comparisons x < y, HTML tags |
2. Operators and Arithmetic Symbols
| Symbol |
Name |
Use Case Examples |
| + |
Plus |
Addition, string concat |
| - |
Minus |
Subtraction |
| * |
Asterisk / Star |
Multiplication, pointers |
| / |
Slash |
Division |
| % |
Modulus |
Remainder after division |
| = |
Assignment |
Assign value x = 10 |
| == |
Equal to (comparison) |
if (x == y) |
| != |
Not equal to |
if (x != y) |
| ++ |
Increment |
i++ |
| – |
Decrement |
i-- |
3. Logical & Bitwise Operators
| Symbol |
Name |
Use Case Examples |
| && |
Logical AND |
if (x && y) |
| ! |
Logical NOT |
if (!x) |
| & |
Bitwise AND |
x & y |
| ` |
` |
Bitwise OR |
| ˆ |
Bitwise XOR |
x ^ y |
| ~ |
Bitwise NOT |
~x |
| << |
Bitwise Left Shift |
x << 1 |
| >> |
Bitwise Right Shift |
x >> 1 |
4. Punctuation & Special Characters
| Symbol |
Name |
Use Case Examples |
| ; |
Semicolon |
Statement terminator in many languages |
| : |
Colon |
Labeling, Python blocks, ternary operator |
| , |
Comma |
Parameter separator |
| . |
Dot |
Access members obj.method |
| -> |
Arrow |
Struct pointer access in C/C++, lambda functions |
| :: |
Scope resolution |
C++ namespace/class resolution |
| # |
Hash |
Preprocessor directive in C/C++ (#include) |
| @ |
At |
Decorators in Python, annotations in Java |
| $ |
Dollar sign |
Variable prefix in shell, PHP |
| _ |
Underscore |
Variable naming, constants |
| \ |
Backslash |
Escape characters (\n, \t) |
| ‘ ‘ |
Single quotes |
Char literals, strings in some languages |
| “ “ |
Double quotes |
String literals |