-
Please Help ~
Can somebody teach me how can i do it :
----------------------------------------------------------------------------------------------------------
Note: You are not allowed to use any functions in the <string.h> library.
Develop a program that allows the user to enter a string and performing the following operations on it:
- Count Number of Characters In String
- Count Number of Words In String
- Remove Spaces In String
- Reverse String
- Reverse Words In String
- Look For Substring In String
- Insert Substring Into String
The following screen suggests a possible user interface:
Enter String: C is Fun!
1 ¡V Count Number of Characters In String
2 - Count Number of Words In String
3 - Remove Spaces In String
4 ¡V Reverse String
5 ¡V Reverse Words In String
6 ¡V Look For Substring In String
7 ¡V Insert Substring Into String
Enter Choice:
whereby:
If option 1 is chosen, 7 (including any special characters but excluding spaces) is shown on the screen.
If option 2 is chosen, 3 is shown on the screen
If option 3 is chosen, 'CisFun!' is shown on the screen
If option 4 is chosen, '!nuF si C' is shown on the screen
If option 5 is chosen, 'C si !nunF' is shown on the screen
If option 6 is chosen, get user to enter the substring he wants to find and display a message to tell him whether it is in the string
If option 7 is chosen, get user to enter a substring, and the position he wants to insert into the original string. The new string is then displayed on the screen.
----------------------------------------------------------------------------------------------------------
I wish to know, can i use strlen, strlwr, etc functions ??? (Since there say can't use any functions in the <string.h> library) If can't use it, then how can i do this question ?
Thanks to those who answer me !
-
Important Steps to getting help
Step 1) Don't use titles with [urgent] or the like in the title
Step 2) Attempt to do the homework and post the code
Step 3) If you have questions about the assignment ask your instructor.
-
OK, sorry about that i use the word [urgent] (but it really urgent)
First thing i have to say is : if i can get help from my lecturer, i need no to come here and ask....
AND
It is not assignment actually, is my college's past year question, i got no answer and my lecturer dun give the answer also, so i come here and ask
So , please...Can somebody help me ?
-
>>It is not assignment actually,
>> is my college's past year question,
There's no difference. Whatever your viewpoint, it's an assignment, and as such you must make an effort to complete the task. Posting it here like this will get you no-where, (most) people won't help people that don't appear to be helping themselves.
Now, shape up, do some reading and post the code you've tried so far if you get stuck.
Whilst you're at it, read the forum guidelines thread at the top of this forum. You've broken various rules already, please don't break anymore.