What is the difference between const pointer and pointer to const in C ?

In C programming, pointers are fundamental tools that allow direct manipulation of memory. However, when combined with the const qualifier, they can introduce subtle distinctions that often confuse both beginners and seasoned developers. At first glance, the terms const pointer and pointer to const might seem interchangeable, but they serve different purposes. This article explores […]

Optimizing Enum Storage in C with -fshor-enum flag

When working with C, efficiency in memory usage can be a critical factor, especially in embedded systems or low-level programming. One lesser-known yet powerful GCC compiler flag that can help optimize storage is -fshort-enums. This flag changes the way the compiler allocates memory for enumerations (enum), potentially reducing the size of compiled code. In this […]

Naming convention in C

In the world of C programming, the clarity and maintainability of your code often hinge on a seemingly simple yet crucial aspect: naming conventions. From variables to functions, constants to macros, the names you choose can significantly impact how easily others (and your future self) understand and work with your code. While the C language […]