4 ms·
> Are we seriously talking about nested pointers, alignment and CPU registers before we've even introduced printf? No, printf is introduced in the very first h
by tom_mellior 9y ago
> Are we seriously talking about nested pointers, alignment and CPU registers before we've even introduced printf?
No, printf is introduced in the very first hello world example. But the concept of format strings is not explained, nor are variadic functions, and no documentation for printf is linked.
Also, the example
#define MY_TITLE "Hello world"
printf("This is: %n", MY_TITLE);
is really quite broken. %n needs and int* argument and writes the number of characters written so far to it. A string constant is not only of the wrong type, even more importantly it is not writable (though not const).
Of course a modern compiler with -Wall would catch this, but the tutorial never mentions any flags you might want to pass to your compiler...