Assignment #7: Strings in C

In your csc2400 directory, create another directory called strings. In the strings directory, write solutions to all hands-on exercises from the lecture slides:
  1. Write a function length that mimics strlen (without using strlen).
  2. Write a function compare that mimics strcmp (without using strcmp).
  3. Write a function copy that mimics strcpy (without using strcpy).
  4. Write a function concat that mimics strcat (without using strcat). When testing this function, make sure that the buffer allocated for the first string argument is long enough to hold the concatenated string.
  5. Write a simple test program to show how sprintf works.
Leave your solutions in the strings directory so that the instructor can test them if necessary. Submit a printed copy of your solutions on the due date of this assignment.