what is this supposed to do?

Henry Spencer henry at zoo.toronto.edu
Tue Apr 23 10:33:14 AEST 1991


In article <1991Apr22.225641.1122 at midway.uchicago.edu> langer at control.uchicago.edu (Steve Langer) writes:
>What is the expected output from the following program? Is it defined?
>   printf("1 << 32 = %o\n", ((unsigned) 1) << 32);

Assuming you're on a 32-bit machine, no, it is undefined.  Translation,
expect different machines to do different things, some of them unpleasant.
-- 
And the bean-counter replied,           | Henry Spencer @ U of Toronto Zoology
"beans are more important".             |  henry at zoo.toronto.edu  utzoo!henry



More information about the Comp.lang.c mailing list