₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,809 members, 8,513,800 topics. Date: Thursday, 05 November 2026 at 02:33 PM

Toggle theme

Ecrazed's Posts

Nairaland Forum › Ecrazed's Profile › Ecrazed's Posts

1 (of 1 pages)

Programming › I Have A Few Questions For C Progamming by ecrazed(op): 3:55pm On Mar 29, 2010
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)