Path: utzoo!attcan!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.lang.c Subject: Re^2: total space of a string (was: hardcoded constants) Message-ID: <1843@star.cs.vu.nl> Date: 21 Dec 88 16:55:32 GMT References: <1988Dec8.173158.11839@utzoo.uucp> <846@starfish.Convergent.COM> <9134@smoke.BRL.MIL> <1988Dec13.172306.16195@utzoo.uucp> <5146@bsu-cs.UUCP> <1988Dec15.190331.2986@utzoo.uucp> <33604@think.UUCP> <1827@solo11.cs.vu.nl> <29@rpi.edu> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 20 kyriazis@rpics (George Kyriazis) writes: \"/" is a pointer to a string containing a '/' and a '\0'. Therefore \it seems to me that sizeof "/" will return the same value as \sizeof( char * ). \Comments?? % cat c.c main() { printf("%d\n", sizeof "let's try out before we post"); } % cc c.c % a.out 29 % Aha! sizeof(char *) == 29 -- fcntl(fd, F_SETFL, FNDELAY): |Maarten Litmaath @ VU Amsterdam: let's go weepin' in the corner! |maart@cs.vu.nl, mcvax!botter!maart