Program code for polynomial addition using C
/*code for adding two polynomials. please avoid giving duplicate power term. you can enter term values (coefficient and power) in any order. this code is designed for sorting them in appropriate order */ #include<stdio.h> #include<conio.h> #include<alloc.h> typedef struct Polynomial{ int coeff; int powe; struct Polynomial *next; }pl; pl *create(); pl *polyadd(pl *,pl *); void bubblesort(pl *); void disp(pl *); void main() { pl *h1,*h2,*h3; clrscr(); printf("\n\nEnter value for first polynomial : "); h1=create(); printf("\n\nEnter value for second polynomial : "); h2=create(); bubblesort(h1); bubblesort(h2); printf("\n\nFirst Polynomial is : "); disp(h1); printf("\n\nFirst Polynomial is : "); disp(h2); h3=polyadd(h1,h2); printf("\n\nAdded result of two Polynomial is : "); disp(h3); getch(); } pl *create() { pl *temp,*ptr,*h=NULL; int v,u; char ch; while(1) { printf(...