Question: Code in C Write a function named find_digits that finds the digits ('O' to '9') in the string parameter str1 and store them in str2.
Code in C

Write a function named find_digits that finds the digits ('O' to '9') in the string parameter str1 and store them in str2. For example, if str 1 contains "Mary has 10 strawberries. Dan has 15 strawberries", then str2 will be "1015". Character library functions such as isdigit() are not allowed. Use pointers and pointer arithmetic to process strings. In other words, eliminate the loop index variables and all use of the [] operator in the functions. void find_digits(char *str 1, char *str2){ //add your code }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
