Mail Archives: djgpp/1999/10/06/07:28:25
From: | paul DOT r DOT johnson AT gecm DOT com
|
Disclose-recipients: | prohibited
|
Date: | Wed, 06 Oct 1999 08:34:41 +0100 (CET)
|
Subject: | Re: Newbie: help it won't work!!!!
|
To: | djgpp AT delorie DOT com (Reply requested)
|
Message-id: | <2241340806101999/A01721/GMS01V/11DA32222800*@MHS>
|
Autoforwarded: | false
|
MIME-version: | 1.0
|
Importance: | normal
|
Sensitivity: | Company-Confidential
|
UA-content-id: | 11DA32222800
|
Hop-count: | 2
|
Reply-To: | djgpp AT delorie DOT com
|
Sune Nielsen (sunegn AT image DOT dk) wrote:
[...]
> When I declare an array eg,
> int array[3];
> should I index it from 0 through 2 or should it be from 1 through 3,
> or could it even be from 0 through 3!?
0 through 2 (both ends inclusive). Which means there are 3 elements in
the array, altogether, thus the [3] in its declaration.
> I know this is really basic C-stuff, but the Kris Jamsa book I use
> apparently doesn't clearify this thoroughly (I'm confused anyway,
'cos
> I though I understood it)...
>The message of this is clear then: that book obviously is of no real
>use. You may have to consider dumping it and getting a better one.
>If
>the author of a book on C doesn't manage to get even this extremely
>basic and crucial fact across, chances are you'll never learn C from
>it, properly.
--
>Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
>Even if all the snow were burnt, ashes would remain.
--
I'm new to C myself and have found the C tutorial by Gordon Dodrill,
(you can find it at http://www.swcp.com/~dodrill/) very good. Hope
this helps.
Paul
- Raw text -