Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions