Skip to main content
\(\newcommand{\doubler}[1]{2#1} \newcommand{\binary}{\mathtt} \newcommand{\hex}{\mathtt} \newcommand{\octal}{\mathtt} \newcommand{\prog}{\mathtt} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section2.10Programming Exercises


Using the program in Listing 2.9.2, how many bits are in the largest unsigned integer that is supported by this program?

Hint Answer

Modify the last printf statement in the program in Listing 2.9.2 so that the hexadecimal value is displayed in signed integer format. What is the largest integer you can enter in hexadecimal while still getting “correct” output?


Modify the program in Listing 2.9.2 so that it also displays the addresses of the x and y variables. The addresses should be displayed in hexadecimal. How many bytes does the compiler allocate for each of the ints?

Hint Solution