sizeof() confusion

Doug Gwyn gwyn at smoke.brl.mil
Thu Nov 15 02:50:12 AEST 1990


In article <2692 at cirrusl.UUCP> dhesi%cirrusl at oliveb.ATC.olivetti.com (Rahul Dhesi) writes:
>If characters are promoted to ints in expressions, ...

But they aren't always.  It depends on the context.
The same is true for conversion of array name to pointer.

>I'm sure K&R, H&S, and the ANSI standard all define these things in
>various places.  But they can only guarantee what things mean, not
>whether the meanings they define will surprise programmers.

A good way to avoid being surprised is to learn what the things mean
before attempting to use them.



More information about the Comp.lang.c mailing list