Hi- in C, is it guaranteed that (unsigned)&ptr[1] - (unsigned)&ptr[0] == sizeof ptr[0]
and hence that ptr = malloc(n * sizeof ptr[0]); will (attempt to) allocate enough memory for ptr[0..n-1] ? Or do you have to allow for possible padding etc.? John
Hi- in C, is it guaranteed that (unsigned)&ptr[1] - (unsigned)&ptr[0] == sizeof ptr[0]
and hence that ptr = malloc(n * sizeof ptr[0]); will (attempt to) allocate enough memory for ptr[0..n-1] ? Or do you have to allow for possible padding etc.? John