If I build and run the following program in Visual C++ 2017:
#include <stdio.h>
int main()
{
int a[3] = { 0 };
for (int i = 0; i < 3; i++)
{
printf("%llu %u %p\n", a + i, a + i, a + i);
}
return 0;
}
I see output like as follows:
31519768560270096 7338768 000F1055
31519785740139284 7338772 000F1055
31519802920008472 7338776 000F1055
That I cannot relate.
Why the output of %llu
are so different? sizeof(int)
on my platform is 4.
Why the output of %p
are all same? They are address of different variables.
Only the output of %u
seems to be consistent - consecutive memory location of 3 array elements each having 4 bytes. But these output matches with neither %llu
nor %p
.