IF you’re still confused then click on this link to get the answer.

ELSE, explanation: there is a base case which is invoked when the condition in that case is matched. Otherwise, a recursive call is made again.

Example:

Here’s a function which will sum the first **n** elements of an array.

```
int sum(int arr[], int size) {
int result;
if (size == 0) // base case
result = 0;
else {
// recursive call
int smallResult = sum (arr, size - 1);
// use solution of recursive call to solve this problem
result = smallResult + arr[size - 1];
}
return result;
}
```

If the arr was {1, 2, 3} so the size was 3 initially. sum() will be called with size = 3, then base case is checked, which is false, so a call to sum() with size = 2 is made, which in turn calls sum() with size = 1 and so on… When the sum() is called with size = 0, the base case is true, hence the ultimate call returns the value of result to the function which had called it, which in turn returns the value to the function which had called the penultimate function and so on… and hence the first call returns the answer to wherever the function was called from, within the program.