2x^7 - 4x^4 + 3x^2 - 4then the output should be:
14x^6 - 16x^3 + 6xOn the runner system, in directory ~djimenez/cs1723/diff (the full path is /home/staff3/djimenez/cs1723/diff) you will find a Makefile and several .h and .c files that combine to read, construct, and print polynomials as linked lists of terms called monomials. Each monomial is something like 2x7 and is represented as a struct like this:
typedef struct _mono { double coeff, power; } mono;where coeff is the coefficient x is multiplied by and power is the exponent x is raised to. Note that a zero power implies a constant (i.e., coeff time x0), and a zero coefficient implies the entire term is zero and should be left out of the polynomial.
The file calc.c contains a driver program that reads in a polynomial as a linked list (so you don't have to worry about how to do that), prints the polynomial on the screen (again, you don't have to do that), calls a function you will write to differentiate the polynomial, then prints the derivative.
The file mono.h contains declarations for the mono struct above and declarations used by a file called mono.c that reads in terms; this C file is only used internally and you don't need to look at it.
The file poly.h declares an abstract data type poly for polynomials. poly is a pointer type to a linked list of mono terms. Some functions declared in this file and defined in poly.c are:
The file diff.h declares a single function, poly differentiate (poly);. Your assignment is to write this function. It accepts poly linked list and returns a new poly linked list (without modifying the old one) that contains the derivative. You should write this function (and any support functions you will need) in a file called diff.c. An empty diff.c is provided that just returns NULL so that you can get everything compiled before you get everything working.
18 x -2x^7 - 3x^6 + 5x^2 - 18 x^2 + 2x^2 - 8x^-14 + 4 3x^10 - 2x^10 + 8x^2 + 10x^2 - x^100
Mail -s "Assignment 4" djimenez@ringer.cs.utsa.edu < diff.cMake sure your name is in your well-commented C file.