Introduction
Recursion is a programming technique where a function calls itself, allowing the function to repeat until a base case is met and the function returns the final output. In this lab, we will learn how to find the sum of digits of a given number using recursion.
Note: You need to create the file
~/project/main.c
yourself to practice coding and learn how to compile and run it using gcc.
cd ~/project
## create main.c
touch main.c
## compile main.c
gcc main.c -o main
## run main
./main