Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!rutgers!gatech!bloom-beacon!eru!hagbard!sunic!sics.se!fuug!news.funet.fi!hydra!cc.helsinki.fi!wirzenius From: wirzenius@cc.helsinki.fi (Lars Wirzenius) Newsgroups: comp.lang.c Subject: Re: How come << falls through at 16 on a 32-bit integer? Message-ID: <1991Apr14.022519.5981@cc.helsinki.fi> Date: 14 Apr 91 02:25:19 GMT References: <11004@uwm.edu> Organization: University of Helsinki Lines: 10 In article <11004@uwm.edu>, markh@csd4.csd.uwm.edu (Mark William Hopkins) writes: > Why am I getting 0 for output here when unsigned long's are 32 bits with the > * unsigned long M = 34; > * printf("%08x\n", M << 16); It's because the x format specifier means the argument is of size int, not long. Use lx instead. -- Lars Wirzenius wirzenius@cc.helsinki.fi