Some aspects of C that often trip up programmers:

  • Complex operator precedence rules - use parentheses liberally

  • Type casting can lead to unexpected behavior

  • switchΒ statements β€œfall through” cases - addΒ breakΒ statements

  • staticΒ means different things in local vs global scope

  • Common bugs:

    • Forgetting break statements in switch blocks
    • Mismatched pointer types in casts
    • Misunderstanding order of increment/decrement operators
    • Undefined behavior from numerical overflow or invalid memory access