C Practical and Assignment Programs- Sum of digits Recursion

preview_player
Показать описание
C Practical and Assignment Programs- Sum of digits Recursion
In this video we will find the sum of digits using recursion.We will be defining a recursive function to calculate it. A recursive function has two conditions STOPPING condition and RECURSIVE condition.The full description of question is provided below. Now this program is written in C programming language but will work in C++.Fell free to provide you suggestion.
Q. To find Sum of digits of a number in C using recursion.

We The Computer Guys
Shreyas Zagade
Aakash Thakur
Ananya Jain
Рекомендации по теме
Комментарии
Автор

Excellent tutorial - although I cannot understand what's happening at line 12. Wouldn't after the first execution of the function the variable sum be the unitsPlace number plus the rest of those together? for example if the number is 325 - sum = 5 + 32? 

fsimz