Answers to Exercises

  1. 3c43. In case you got a different result, here's a little help:

    1. If you got the result 433a, you started at the wrong address.

    2. If you got the result 433c, you had the bytes reversed.

    3. Finally, if you got 3a43, you made both of these mistakes.

    If you made one or more of these mistakes, don't feel too bad; even experienced programmers have trouble with hexadecimal values once in awhile. That's one reason we use compilers and assemblers rather than writing everything in hex!

  2. "HELLO". If you couldn't figure out what the "D" at the beginning was for, you started at the wrong place.

  3. Figure 3.25 is Susan's answer to this problem.

    Figure 3.25. First dinner party program (code\basic05.cc)

    By the way, the reason that this program uses two ...

Get Learning to Program in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.