Question: The language is c++ using the C functions: strlen, strcpy, strncpy, strchr, strrchr, strstr, strcmp and strcat. 1. You need to take an input from

The language is c++

using the C functions:

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

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

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

and the output would be:

Remember

you

are

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

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

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

-------------------------------------------------

start the code shown below

#include using namespace std;

int main()

{ char theString[ 81 ]; cout<< "Welcome to Custom C string Functions."<

cout<<"Enter a string of three or more words:"; return 0; }

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!