top of page
Blog


Understanding Strict-Aliasing Rules
The strict-aliasing rules allow the compiler to assume that your code does not alias between incompatible types. In this way, the compiler
Damiano Pe
Jan 26, 2022
234


A Trick You May Not Know And You Shouldn't Even Use
In 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 Pe
Jan 12, 2022
130


C-Christmas tree
In this article we will create a sparkling Christmas tree in C using ANSI escape sequences and a smart use of pointers
mattiaducci
Dec 21, 2021
415
![The Difference Between char str* And char str[]](https://static.wixstatic.com/media/7407f3_6e3259b7b3cc4908b08d2d8cfef82bfc~mv2.png/v1/fill/w_444,h_250,fp_0.50_0.50,q_35,blur_30,enc_avif,quality_auto/7407f3_6e3259b7b3cc4908b08d2d8cfef82bfc~mv2.webp)
![The Difference Between char str* And char str[]](https://static.wixstatic.com/media/7407f3_6e3259b7b3cc4908b08d2d8cfef82bfc~mv2.png/v1/fill/w_295,h_166,fp_0.50_0.50,q_95,enc_avif,quality_auto/7407f3_6e3259b7b3cc4908b08d2d8cfef82bfc~mv2.webp)
The 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 Pe
Dec 9, 2021
99


Effectively Use extern To Share Global Variables
The cleanest and most reliable way to export a global variable is to put an extern declaration inside a header file. This way, when...
Damiano Pe
Nov 25, 2021
44


How To Cast The Result Of malloc
A question that often arises when allocating a new block of memory in C is: should I cast the result of malloc or not?
Damiano Pe
Nov 18, 2021
60


Don't Use feof() To Control A File Read Loop
How do you successfully create a file reading loop by checking if you have reached the end of the file? In C the function feof checks for...
Damiano Pe
Nov 10, 2021
49


Understand All Declarations With The Clockwise-Spiral Rule
The Clockwise-Spiral Rule is a must-have tool that lets C/C++ programmers quickly understand the meaning of variable or function declaration
Damiano Pe
Nov 3, 2021
125


The Meaning Of argc And argv In main()
The input parameters argc and argv are used to send arguments to a program. The program receives arguments thanks to argv, which is a...
Damiano Pe
Nov 2, 2021
58
bottom of page