polynomial
polynomial
h>
#include <stdlib.h>
} Node;
newNode->coeff = coeff;
newNode->pow = pow;
newNode->next = NULL;
return newNode;
Node* temp;
if (*poly == NULL) {
*poly = newNode;
} else {
temp = *poly;
temp = temp->next;
temp->next = newNode;
}
// Function to display the polynomial
poly = poly->next;
if (poly != NULL)
printf(" + ");
printf("\n");
poly1 = poly1->next;
poly2 = poly2->next;
} else {
poly1 = poly1->next;
poly2 = poly2->next;
poly1 = poly1->next;
poly2 = poly2->next;
return result;
int n,i;
scanf("%d", &n);
// Main function
int main() {
readPolynomial(&poly1);
readPolynomial(&poly2);
displayPoly(poly1);
displayPoly(poly2);
displayPoly(result);
return 0;