Exercises, First Set

1 Assume that a short variable named z starts at location 1001 in a little-endian machine. Using Figure 3.5 for the contents of memory, what is the value of z, in hex?

Figure 3.5. Exercise 1

Underware?

I can almost hear the wailing and tooth gnashing out there. Do I expect you to deal with these instructions and addresses by yourself? You 'll undoubtedly be happy to know that this isn't necessary, as the compiler takes care of these details. However, if you don't have some idea of how a compiler works, you'll be at a disadvantage when you're trying to figure out how to make it do what you want. Therefore, we're going to ...

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.