Take-home Lab 3 due July 11 12noon

Write a C function called repeater that takes, as arguments, a string s and an integer r and returns a char pointer representing a newly-allocated string whose contents are r occurences of the string s. Allocate just enough space for the resulting string while leaving the string s intact. For example, the call repeater( "ho", 4 ) will return the string "hohohoho" .

The following header file contains the prototype/signature of the repeater function. Use the following tester program which should produce the following output .

Your function should be defined in a file called repeater.c . Submit a zip file containing all three files (make sure you do not modify repeater.h and reptest.c) through moodle by noon July 11. Make sure your write your name in that source file.