A define problem
Michael Davidson
md at sco.COM
Wed Jan 9 19:38:29 AEST 1991
In article <440 at bally.Bally.COM> siva at bally.Bally.COM (Siva Chelliah) writes:
>#define half(x) (x)/2
>main ()
>{
> int i=5;
> printf( "i/2 = %d\n",half(i-5));
>}
>This program prints 3 instead of 0 ! How can I make it print 0 ?
Compile it with a C compiler perhaps??
If you compiled precisely this sample code and got 3 written to
standard output instead of 0 then you have, at best, a broken C compiler.
More information about the Comp.lang.c
mailing list