Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

c program to find sum of array elements using recursion

int sum(int arr[], int start, int len)
{
    // Recursion base condition
    if(start >= len)
        return 0;
 
    return (arr[start] + sum(arr, start + 1, len));
 
PREVIOUS NEXT
Tagged: #program #find #sum #array #elements #recursion
ADD COMMENT
Topic
Name
3+3 =