I have a question regarding some "borrowed" code:
How does the 0xff ensure that only 8 bits per byte are used? I'm not making the connection here. Can someone break this down in terms of "C for 5th graders".Code:#define ASIZE sizeof(int); unsigned int uival; unsigned char bytes[ASIZE]; int i; ... for (uival = 0, i = 0; i < ASIZE; i++) { uival = 256 * uival + (bytes[i] & 0xff); }
Thanks