Implement the functionality of the following string functions:
Your program should include a driver routine that tests each of the above functions. Your compiled program should take three command line arguments: two strings and one integer. The two strings should be passed to each of your functions, and the integer should be used as the number of characters to copy in the strncpy function.
Your program will be evaluated for style, especially correct indentation, comments, and variable usage. You should have no global variables in this assignment. Be sure to use indent -kr -nut on your program.
$ stringtest Hello Lab 2 Output of strlen: 5 (Hello) 3 (Lab) Output of strcmp: -1 Hello is less than Lab Copying the first 2 characters of Hello to Lab yields: Heb $ stringtest John Jacob 4 Output of strlen: 4 (John) 5 (Jacob) Output of strcmp: 1 John is greater than Jacob Copying the first 4 characters of John to Jacob yields: Johnb $ stringtest yummy yummy 2 Output of strlen: 5 (yummy) 5 (yummy) Output of strcmp: 0 yummy is the same as yummy Copying the first 2 characters of yummy to yummy yields: yummy
You should write checkit_* tests for each of your functions. Duplicate your tests using the string.h library functions to demonstrate that your program does the same thing as the library functions.
Name your program stringtest.c and create a Makefile for this program that contains the following compile command:
gcc -ansi -pedantic -Wall -Werror -o stringtest stringtest.c
handin djanzen 101_lab7 stringtest.c MakefileComplete this survey.