Write the countDigits function using the following header to count the occurrences of each digit:
oid countDigits(const int& number, int dArray[], int size) where size is the size of the dArray array. In this case, it is 10 to store the count of ten digits i.e., from 0 to 9.Write a test program that prompts the user to enter an integer, invokes the countDigits function, and displays the counts of each digit in the given integer.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here