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.

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. (Extra Credit, 1 Point)

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

Remember

are

else

everyone

just

like

unique,

you