Exercises
161. | Assume that p1 and p2 are pointers with p1 > p2, and you wish to subtract them in order to obtain the distance between two items. Under what conditions would the expression (DWORD)p1 - (DWORD)p2 be valid? Assuming that the distance is not large, is it necessary to change this expression to (DWORD)(p1 - p2)? Hint: Consider the properties of two's complement arithmetic. |
162. | Remove all 64-bit compiler warnings, if any, from other pointer-intensive programs such as sortBT (Program 5-1) and ThreeStage (Program 10-5). |
163. | If you have access to a Win64 system, test the 64-bit programs. Also, assure that the 32-bit builds still operate correctly. |
