if i understand u better if u want to check for -1; it means that u printing the array in a revese order. u point the pointer at the end of anj array. and u loop back to the first elements. so your while look show be
Code:
#define MAX 10
.
.
int i=MAX;
int array[MAX] = {10,20,30,40,50};
.
.
while(i>-1)
printf("%d\t",array[i]);
// with the for loop it same again
for(j=MAX;j>-1;j++)
printf("%d\t",array[i]);
or if u wanted to print it asusual from the 0th element
for(i=0;i<MAX;i++)
printf("%d\t",array[i]);
note that all array elements starts from 0(array[0],[1][2]...)
it would be better if u could show us your code attempt
ssharish2005