This function is to print to the specified stream a series of characters from the given string. The string is to be printed within the indicated field width. For example if the field width is 10 and the string is Fred then 6 blank spaces are printed and then the 4 characters from the string are printed. If the field width is -10 then the 4 characters from the string are printed followed by 6 blanks. If the number of characters in the string are greater than the indicated size of the field, then only print the first n characters. For example if the string was Michigan and the field width was 5 then the function would only print Michi. The return value for the function is the actual number of characters from the string that are printed, this does not include any blanks that are printed.
In order to test your function you must also write a main program that calls the function. Write a simple main program that asks the user for a string and a field width and prints the string to the screen.
The following must be delivered to your instructor via text-only email by the end of class on 8th Tuesday February 24, 1998.