Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!lsuc!ncrcan!brian From: brian@ncrcan.UUCP (Brian Onn) Newsgroups: comp.lang.c Subject: why doesn't printf work right? Message-ID: <296@ncrcan.UUCP> Date: Thu, 30-Jul-87 10:59:24 EDT Article-I.D.: ncrcan.296 Posted: Thu Jul 30 10:59:24 1987 Date-Received: Sat, 1-Aug-87 08:57:34 EDT Distribution: na Organization: NCR Canada Ltd., Mississauga, Ontario Lines: 11 Reply-To: Why does the following code output ffffffff, instead of simply ff, which I expected from it? Size of short is 16 bits. I have tried this on a Sun, Vax 11/750, and an NCR Tower. main() { short i = -1; printf("%2.2x\n",i); }