Thanks, AWOL and CrossRoads, now the code makes more sense and shows a clear problem:
With a globally defined
** ** int i;** **
one can use it even when not appropriate any more.
After the for( ) has finished, i is beyond the range of the array.
VCO_Final = VCO_Final2[i]; // puts some undefined value into VCO_Final
if(VCO_Final < VCO_Final2[i]) // should never be true, after the previous line