9
I know the pointer comparisons with < is allowed in C standard only when the pointers point at the same memory space (like array).
if we take an array:
int array[10];
int *ptr = &array[0];
is comparing ptr to array+10 allowed? Is the array+10 pointer considered outside the array memory and so the comparison is not allowed?
example
for(ptr=&array[0]; ptr<(array+10); ptr++) {...}