C - Loop Control Statements
Consider this function that returns the sum of positive numbers until a zero is found:
int sumUntilZero(int arr[], int size) {
int sum = 0;
for(int i=0; i 0) sum += arr[i];
}
return sum;
} What will be the output for input array {1, 2, -1, 0, 5}?