Question: Please use C Programming. Write and test a function that determines the number of digits in an integer. Name this function count_digits. Your lab instructor
Please use C Programming.
Write and test a function that determines the number of digits in an integer. Name this function count_digits. Your lab instructor will help you discover a way to count the number of digits in an integer number int count_digits(int n) ; Your function count_digits should always return the correct number of digits in the number, regardless of if it is given a positive or negative integer number. For instance, if the following integers 0, 10, 12345, -4 are given to count_digits one at a time, the function should produce the following results 1, 2, 5, and 1.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
