It seems that you are confusing the value of 'c' with the value in the array.

Code:
char arr[4] = {9, 8, 7, 6};
int c;

for (c=0; c <= arr[c]; c++} ...
Will loop until c is equal or lower than the value in arr at position c