I have difficulty understanding this [piece of code](http://ideone.com/pkhGL):

Particularly this part:

```
     // check that the stuff we wrote has not changed
     if(n[k][0]!=(unsigned char)(n[k]+s[k]+k))
        printf("Error when checking first byte!\n");
     if(s[k]>1 && n[k][s[k]-1]!=(unsigned char)(n[k]-s[k]-k))
        printf("Error when checking last byte!\n");

```

The whole program tries to mimic the Windows' `malloc` and `free` function.
It must be run on Windows.

Anyone can explain how those 2 ifs work?

Thanks.