it's idiomatic to initialize a block of memory to zero by
memset(p, 0, size_of_p);
when we want to initialize it to minus one, we can:
memset(p, -1, size_of_p);
no matter what type p is, because in two's complemenatry representation, minus one is 0xff for 8 bits integer, 0xffff for 16 bits, and 0xffffffff for 32 bits.
My concern is, is such two's complementary representation universally applicable in the realm of modern computers? Can I expect such code platform-independent and robust enough to port to other platforms?
Thanks in advance.