This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: char fullName); With two string arguments (firstName, lastName), and returns: * LASTNAME, FIRSTNAME * through the third argument. Task #5 Write the following function: int charCount(char myString, char searchChar); This function takes a string and a character as arguments, and returns an integer containing how many times ‘searchChar’ appears in ‘myString’. Write a main program to show this function works. Example : charCount(“hello”,’l’) should return 2. Example : charCount(“hello”,’x’) should return 0. Task #6 Write a program that reads a string from the user, and then prints it backwards. Example: reverse(“abcdef”) Should print: “fedcba” Task #7 Write a function: void makeLower(char myString); Which makes myString all lowercase. Write a main program to test this....
View Full Document
- Fall '06
- Return statement, Family name, Given name