C Programming20795 marksNested and Recursive Function
Write a program to find the sum of digits of a given integer using recursion.
Write a program to find the sum of digits of a given integer using recursion. [5]
The sum of digits of a number can be found recursively by: - Base case: If the number is 0, return 0 - Recursive case: Return (number % 10) + sumOfDigits(number / 10) For example, for n = 123: - 123 % 10 = 3, then call sumOfDigits(12) - 12 % 10 = 2, then call sumOfDigits(1) - 1 % 10 = 1, then cal...