Since adding two pointers together is illegal, how is this piece of code valid?
struct key *low = &tab[0];
struct key *high = &tab[n];
struct key *mid;
while (low < high)
{
mid = low + (high-low) / 2;
The first statement in the while loop seems to add two addresses together, how is this legal?
This code is from K & Rs C programming language on page 122
source
share