#include #include //Struct for a polynomial term (double linked list object) typedef struct Polynomial t_Polynomial; typedef struct...
Question:
#include
#include
//Struct for a polynomial term (double linked list object)
typedef struct Polynomial t_Polynomial;
typedef struct Term
{
// coefficient of the polynomial term associated with the object
int coef;
// power of the polynomial term associated with the object
int power;
// pointer to the next object (to facilitate a doubly linked list)
struct Term *next;
// pointer to the previous object (to facilitate a doubly linked list)
struct Term *prev;
// pointer to the Doubly Linked List this object is in (so we don't lose it)
struct Polynomial *parent;
} t_Term;
// Struct for the polynomial (double linked list, list)
typedef struct Polynomial
{
// number of items in the list
int numTerms;
// pointer to the first term in the list
struct Term *head;
// pointer to the last term in the list
struct Term *tail;
} t_Polynomial;
COMPLETE THE BELOW FUNCTION
// Allocate space for a new polynomial term, set the coefficient and power values, set the next, prev, and parent pointers to be NULL, and then return a pointer to the allocated and initialized memory.
t_Term *
Create_Polynomial_Term(int coefficient, int power)
{
return NULL;
}