Question: 4) (15 pts) Write a recursive C+ function int count_digit(int digit, int num) that returns the number of occurrence of digit in the decimal representation

 4) (15 pts) Write a recursive C+ function int count_digit(int digit,

4) (15 pts) Write a recursive C+ function int count_digit(int digit, int num) that returns the number of occurrence of digit in the decimal representation s an int between zero and nine inclusive. For example, the call count digit8 ould return 3, because there are three eights in the decimal representation of 18488) sh 184 ten, while num %10 is the remainder of num divided by ten. 88, Recall that if num is an integer, then num/10 is the integer part of num divided by

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!