R
Richard
Malcolm McLean said:Richard said:No. Most include one. The index is generally the count.
void setzero(double *x, int N)
{
while(N--)
x[N] = 0;
}
One integer indexing
No integer indexing.
while(n--){
*x++=0;
}
void setzero(double *x, int N)
{
int i;
for(i=0;i<N;i++)
x = 0;
}
two integer indexing. We use two integers to calculate each array
access. At leat notionally, N is referenced for each operation. In
one integer. i. Dont confuse the limits with the index.