Question: c++ Lab 8: String Functions This week we will work on our own implementations of C string Functions. You guys are already experts in using

c++

Lab 8: String Functions

This week we will work on our own implementations of C string Functions.

You guys are already experts in using the C functions:

strlen, strcpy, strncpy, strchr, strrchr, strstr, strcmp and strcat.

This Lab we will write our own string function:

1) Print the words in the string.

2) Sort the words in the String.

please do step 1, step2 and step 3 separately

Step 1: You need to take an input from the user and print the first three words of the string on separate lines. (1 Point)

E.g. the input might be: Remember you are unique, just like everyone else

and the output would be:

Remember

you

are

Step 2: It is similar to the Step 1 but you need to print all the words in the user input string. (1 Point)

E.g. for the input: Remember you are unique, just like everyone else

The output would be:

Remember

you

are

unique,

just

like

everyone

else

Step 3: You need to sort the words according to thier ASCII order and display them.

For the above sample input, the output should now be:

Remember

are

else

everyone

just

like

unique,

you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!