unsigned char vec[5] = {0, 1, 2, 3, 4};  
unsigned int i=0;        
if (i == (sizeof(vec) - 1))