You posted the assignment, now tell us what question you have ???
>>int fnGenerateTelNumber(char cTelephone_Num)
That only declares a single character, not an array of characters. You have to
declare it like this: int fnGenerateTelNumber(char cTelephone_Num[]) or any of its other variants:
int fnGenerateTelNumber(char* cTelephone_Num)
int fnGenerateTelNumber(char cTelephone_Num[7])
When you declare the array in main() make sure you include space to hold the null-terminating character. If you want a 7-digit telephone number then the charcter array must be at least 8 bytes.
Last edited by Ancient Dragon; Jul 20th, 2010 at 12:14 am.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 4864
Solved Threads: 1836
Still Learning
Offline 18,371 posts
since Aug 2005