sizeof behavior (was Bit Addressable Architectures)
Greg Limes
limes at sun.uucp
Fri Apr 15 03:10:12 AEST 1988
In article <8646 at eleazar.Dartmouth.EDU>, major at eleazar.Dartmouth.EDU (Lou Major) writes:
> char foo[]="This is a test.";
> sizeof (foo) == sizeof (char *)
Lou, on my machine (Sun 3/60, SunOS 4.0) this is not true;
sizeof (foo) == sizeof foo == 16
This corresponds with the way I have used sizeof with arrays for
many years now, and in fact the standard unix kernel configuration
files depend on it. Of course, your mileage may vary, but I would like
to hear about any machines where sizeof works the way you state.
-- Greg Limes [limes at sun.com] frames to /dev/fb
More information about the Comp.lang.c
mailing list