C - Loop Control Statements
Identify the error in this C function:
int findValue(int arr[], int size) {
for(int i = 0; i < size; i++) {
if(arr[i] == 10)
return i;
else
return -1;
}
}