sizeof "string"

Peter Wolfe wolfe at mprvaxa.UUCP
Wed Feb 1 02:04:30 AEST 1984


Of course you got the size of a pointer as a result of doing sizeof "string".
"string" is in fact a "pointer" to a constant string.  I believe that sizeof
is the only portable way to dtermine how large data types (eg. char's) are in C.
-- 

    Peter Wolfe
    Microtel Pacific Research
    ..decvax!microsoft!ubc-vision!mprvaxa!wolfe



More information about the Comp.lang.c mailing list