Re^2: total space of a string (was: hardcoded constants)
Maarten Litmaath
maart at cs.vu.nl
Thu Dec 22 02:55:32 AEST 1988
kyriazis at 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 at cs.vu.nl, mcvax!botter!maart
More information about the Comp.lang.c
mailing list