[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: c question: *printf'ing arrays
From: Alexander Best <alexbestms () math ! uni-muenster ! de>
Date: 2009-07-08 22:43:45
Message-ID: permail-2009070822434580e26a0b000075a1-a_best01 () message-id ! uni-muenster ! de
[Download RAW message or body]
thx for all the great help guys.
cheers,
alex
Carlos A. M. dos Santos schrieb am 2009-07-02:
> 2009/7/2 Dag-Erling Smørgrav <des@des.no>:
> > Alexander Best <alexbestms@math.uni-muenster.de> writes:
> >> for (i=0; i < sizeof(hdr->nintendo_logo); i++)
> >> fprintf(stderr, "%x", hdr->nintendo_logo[i]);
> > What will this print if nintendo_logo is { 0x01, 0x02, 0x03, 0x04
> > }?
> Good catch. It will print "0x1234" but it should print "0x01020304".
> My example has the same error. The conversion specification should be
> "%02x", not just "%x".
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic