34
Chapter 2
Yabba dabbad00
u
!
There are 69
v
,105
w
leaves here.
Listing 2-2: A program that uses octal and hexadecimal representations of unsigned integers
The hexadecimal representation of the decimal
3669732608
is
dabbad00
,
which appears in the first line of output as a result of the hexadecimal
format specifier
%x
u
. The decimal 69 is 105 in octal.
The format speci-
fiers for unsigned integer
%u
v
and octal integer
%o
w
correspond with the
arguments at
x
and
y
, respectively. The
printf
statement substitutes these
quantities
vw
into
the format string, yielding the message
There are 69,105
leaves in here
.
Dostları ilə paylaş: