I am looking at the following code:
#include <stdio.h>
#include <inttypes.h>
int main()
{
uint32_t total = 0;
printf("\tTotal: %"PRIu32"\n\n", total);
return total;
}
How does PRIu32
fit into the printf
syntax? I mean, I sorta can guess that, Iu32
probably means "Integer unsigned 32-bit". However, I am not sure which form found in man 3 printf
would accommodate variables outside quotation marks-- and how this can generalize to other statements outside quotation marks.
gcc prog.c -E -P
if You usegcc
. Also String literal sequences like"\tTotal: %" "u" "\n\n"
are combined in pre-compilation preprocessing. – Drawback$ gcc progc -E -P test.c
gives meclang: error: no such file or directory: 'progc'
. What is that command supposed to do? – Ponyprog.c
with the C source you are trying to compile. – Drawback.
, that I didn't interpret it correctly. – Pony