> for (i = 0; i < 10; i++) { > addr = cast(ulong)(&i) + i; > addr = ((addr + 3) >> 2) << 2; > printf("%d %d %d \n", i, addr, i); > } Can you try this? printf("%d %lld %d \n", i, addr, i); the 'll' tells printf about the 'long' type. if you want to print a pointer type, use %p.