Originally posted by vasanth
and whats that 'i' doing there.. whats 'i'..
My guess is that they think because i is in main with a current value, that it has the same value inside the function. In reality, i has some arbitrary value, and is doubtless pointing some place way out of bounds of their array.
One other nifty problem they have:
Code:
long s[9]={2, 2.345 , 2 , 92, 2.5, -1.23};
These are not long values. These are either float or double which are converted to long. As such, your array really holds something like:
Code:
long s[9] = { 2, 2, 2, 92, 2, -1 };
Quzah.