HW8: Separate Compilation Write three simple C source files: promptint.c: contains a single function, promptint(), that receives three arguments: a FILE * parameter that refers to an i/o stream that is ALREADY open for reading a FILE * parameter that refers to an i/o stream that is ALREADY open for writing or is equal to NULL a string that will serve as a prompt An integer value is always returned. First, promptint() checks whether the second FILE * parameter is equal to NULL (NULL is defined in the stdio library, so be sure to include it in the function file). If the FILE * parameter is not equal to NULL, then the third parameter (the string) is written to the i/o stream given by the second parameter. Second, even if the second parameter is NULL, an integer is read from the i/o stream given by the first FILE * parameter and this integer is returned. sample usage: int val; val = promptint(stdin,stdout,"Type an integer"); interpretation - "Type an integer" is written to stdout and an integer is read from stdin. That integer is returned and stored in val. putint.c: contains a single function, putint(), that recieves three arguments: a FILE * parameter that refers to an i/o stream that is ALREADY open for writing a string that serves as a label an integer An integer is returned. putint() writes the string followed by the integer (followed by \n) to the indicated i/o stream (the first argument). putint() returns the number that it printed out. Sample usage: int val1,val2; val2=3; val1 =putint(stdout,"The value is ",val2); The output written to stdout would be: The value is 3 The value 3 is returned and stored in val1. simplesum.c: contains a single function, main(), that calls promptint() twice, each time passing it stdin and stderr as its FILE * arguments. It then uses putint() to print out the sum of the integers returned by promptint() to stdout. The output of this program is a single line of the form: "SUM = x" where "x" is the sum of the integers returned by promptint(). Note: that promptint.c and putint.c are not complete programs, they are merely files that define particular functions. Besides writing these three files, you are to compile them separately, using the "-c" option in the acc command: acc -c promptint.c This will produce a ".o" file . Then produce an executable file from the three object files (the ".o" files): acc promptint.o putint.o simplesum.o BEFORE YOU WRITE YOUR CODE: Read the specs above carefully to make sure you understand exactly what is being called for. BEFORE YOUR SUBMIT YOUR CODE: Test your code very CAREFULLY. You may want to make variations of simplesum.c in order to test promptint() and putint(). SUBMITTING YOUR HOMEWORK: toteach 8 promptint.c promptint.o putint.c putint.o simplesum.c simplesum.o a.out