Xref: news2.mv.net comp.os.msdos.djgpp:5946 From: Norbert Jay Newsgroups: comp.os.msdos.djgpp Subject: Scanf expects 4 bytes. Date: Sat, 13 Jul 1996 15:50:22 -0700 Organization: PANIX Public Access Internet and Unix, NYC Lines: 21 Message-ID: <31E8282D.7E6C@panix.com> Reply-To: norbertj AT panix DOT com NNTP-Posting-Host: norbertj.dialup.access.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp main() { unsigned char x1,x2; printf("\nEnter two hex numbers 00-ff: "); scanf("%x %x",&x1,&x2); printf("\nx1=%02X\nx2=%02X",x1,x2); } Enter two hex numbers 00-ff: 2 3 x1=00 x2=03 This is from a MS C text.