Damiano PeJan 26, 2022Understanding Strict-Aliasing RulesThe strict-aliasing rules allow the compiler to assume that your code does not alias between incompatible types. In this way, the compiler
Damiano PeJan 12, 2022A Trick You May Not Know And You Shouldn't Even UseIn this dev tip, we talk about a trick that most likely you don't know and which is now more than anything else a legacy of the...
Damiano PeDec 9, 2021The Difference Between char str* And char str[]When we define str_1, the compiler creates a character array large enough to hold the string "hello world", which is an immutable string...
Damiano PeNov 25, 2021Effectively Use extern To Share Global VariablesThe cleanest and most reliable way to export a global variable is to put an extern declaration inside a header file. This way, when...
Damiano PeNov 18, 2021How To Cast The Result Of mallocA question that often arises when allocating a new block of memory in C is: should I cast the result of malloc or not?