Ecrazed's Posts
Nairaland Forum › Ecrazed's Profile › Ecrazed's Posts
1 (of 1 pages)
1)Write a function CountNumberOfOccurrence which take a string with maximum size of 49 characters (char array size is 50) and returns the number of occurrence of English characters, spaces, digits and other characters. The number of occurrence for English characters, digits, and other characters using call by reference and the return value gives the number of occurrence for spaces. In your main program, you ask the user to input a string, call CountNumberofOccurrence function to get the corresponding number of occurrence of English characters, spaces, digits and other characters and display the results. A sample input/output looks like following: Input: Enter a string: 8djfa -99jdfadf 882 adf * Output: Number of English characters = 13 Number of space = 3 Number of digits = 6 Number of other characters = 2 |
1 (of 1 pages)