how to calculate underflow in c - Search