Article View: comp.lang.c.moderated
Article #2466Re: Annotations on K&R II
From: Kurt Watzka
Date: Tue, 02 Apr 1996 12:37
Date: Tue, 02 Apr 1996 12:37
29 lines
1281 bytes
1281 bytes
jamie@csd.uwo.ca (J. Blustein) writes:
> ANNOTATIONS ON K&R II
>
> Clarifications
>
> p. 6 main() requires a return (see p. 26)
How about "main() without an explicit return returns an undefined value"?
> p. 135 As the text states: sizeof *x is the size of the
> pointer not the x being pointed to.
Do they write that? Sorry, I don't have K&R 2 at hand right now, but
this is _not_ true. Consider:
char (* x)[20];
char *y;
"sizeof(*x)" is the size of an array of 20 chars, not the size of
a pointer to such.
"sizeof(*y)" is 1 even on machines where "sizeof(char *)" is not
equal to 1.
Kurt
--
| Kurt Watzka Phone : +49-89-2180-6254
| watzka@stat.uni-muenchen.de
Technical Details
Message-ID:
<4jr727$h6o@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4jq1eq$a3c@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: watzka@stat.uni-muenchen.de (Kurt Watzka) Newsgroups: comp.lang.c.moderated Subject: Re: Annotations on K&R II Date: 2 Apr 1996 06:37:27 -0600 Organization: Leibniz-Rechenzentrum, Muenchen (Germany) Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4jr727$h6o@solutions.solon.com> References: <4jq1eq$a3c@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com