On Tue, Nov 11, 2008 at 1:23 AM, satish <[EMAIL PROTECTED]> wrote:
> ok so while running the output , it seems that p never reaches 30 , not
> sure why !
>
> so giving the for loop as any of the following works fine, ...
>
> for (p=0;p<n;p++)
>
> or
>
> for (p=0;p<=n-1;p++)
>
> ,
> but what i am not able to understand is when for(p=0;p<=n;p++) ,
> why is p stopping at p=29 ??
>
> i don find anything wrong in the program though !
Because your array goes from 0 ... 29 but your loop goes from 1 ...
30. The array has no element 30 so if you write to c[30] you have an
array bounds error.
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi