What does value & 0xff do in Java?

It sets result to the (unsigned) value resulting from putting the 8 bits of value in the lowest 8 bits of result. The reason something like this is necessary is that byte is a signed type in Java. If you just wrote: then result would end up with the value ff ff ff fe instead of 00 00 00 fe. A further subtlety is that the & is defined … Read more

What is size_t in C?

According to the 1999 ISO C standard (C99), size_t is an unsigned integer type of at least 16 bit (see sections 7.17 and 7.18.3). size_tis an unsigned data type defined by several C/C++ standards, e.g. the C99 ISO/IEC 9899 standard, that is defined in stddef.h.1 It can be further imported by inclusion of stdlib.h as … Read more