after this code...
while (aIndex < aCount){
if(A[aIndex] < B[aIndex]){
C[aIndex]= A[aIndex];
}
aIndex++;

}//end while
indexing in array c is 1 size more than size of array
so u need to first decrease by 1, and then ur program will never shows exception
try it...
Lokesh