# C program to count digits of a number using recursion

In this C program, we are going to learn **how to count total number of digits of a number using recursion?**

**Given an integer number and we have to count the digits using recursion using C program.**

In this program, we are reading an integer number and counting the total digits, here countDigits() is a recursion function which is taking number as an argument and returning the count after recursion process.

**Example:**

Input number: 123
Output:
Total digits are: 3

## Program to count digits in C using recursion

need an explanation for this answer? contact us directly to get an explanation for this answerOutput