Question
a)Write a C function countDigits() that takes a string as parameter, finds and returns the number of numeric characters ('0', '1', ... '9') in the
a)Write a C function countDigits() that takes a string as parameter, finds and returns the number of numeric characters ('0', '1', ... '9') in the string. Prototype: int countDigits(char str[]);
Write a C function shrinkSpace() that takes a string as parameter, replaces the goups of whitespace character by a single space. Example: " Abcd 7 24 open " " Abcd 7 24 open " Prototype: void shrinkSpace(char str[]);
Write a C function strShuffle() that takes two strings (say s1, s2) as parameters, stores into s2 first the even indexed characters of s1 then the odd indexed characters of s1. Example: if s1 is "Abcd1234", the function will make s2 as "Ac13bd24" Prototype: void strShuffle(char s1[], char s2[]);
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started