What\'s the precedence in the next expression?
item = (char*)heap + offset;
Is it (char*)(heap + offset) or ((char*)heap
(char*)(heap + offset)
((char*)heap
The cast is done first, since it has a much higher precedence. You can look that up in the C precedence table!
Cast trumps binary addition according to the precedence table.
It's ((char *)heap) + offset. Casts have much higher precedence than addition.
((char *)heap) + offset
((char*)heap) + offset