I need to create a function called MyStringFunct which accept 2 built-in strings(character arrays terminated by '\0') as parameters and returns an integer.
int MyStringFunct( char * parm1, char * parm2 )
The program should process according to the following:
Parm1 Parm2 Processing Return value
"Initialize" "Any Text" Store Parm2 in a static -1
variable local to
"Vowels" NULL No. of vowels
in the static
"Consonants" NULL No. of conso-
nents in the
Note: Be sure the function should work no matter what order the above calls are made.
More: How to change the parm1 to be a pointer to a function. Implement the same actions using different functions for "Init", "Vowel" etc..
Could you please write me some code so I can work on this exercise in my book?