Correction, a[33]
Andrew Koenig
ark at alice.UUCP
Sat May 27 03:10:17 AEST 1989
In article <5819 at microsoft.UUCP>, t-iaind at microsoft.UUCP (Iain Davidson) writes:
> Something that went un-noticed in a few messages:
> char a[33]
> is not an array of 33*sizeof (int) but really 34 slots !!!!!
No, it's 33 slots.
> Remember C is start base 0 not 1.
Yes.
> 0..33 = 34 slots of int's.
Yes, but whan you say `char a[33];' you're declaring 0..32, not 0..33
> char a[9] holds 10 characters !!!!
No, char a[9] holds 9 characters.
--
--Andrew Koenig
ark at europa.att.com
More information about the Comp.lang.c
mailing list