My C is rusty. Here are a few tricks I forgot and had to rediscover:
int array; int *pointer = array + 8; // This will be 8, not 8 * sizeof int size_t x = pointer - array;
Number of elements in an array:
int array; // x == 42 * sizeof int. Not what we want size_t x = sizeof array; // The right way to do it: y == 42 size_t y = sizeof array / sizeof array;
That is all.