Polynomial Multiplication using Linked List
#include<stdio.h> #include<stdlib.h> struct node { int coeff,exp; struct node *link; }*A=NULL,*B=NULL,*S=NULL,*P=NULL; struct node * create() { struct node *TP=NULL,*temp=NULL,*LTP=NULL; int n,coeff,exp,i; printf("\n Enter no of Terms of Poly : "); scanf("%d",&n); printf("\n Enter Coefficint and Exponent of Poly in order(k1x^n+k2x^n-1..+knx^0 : "); for(i=0;i<n;i++) { scanf("%d%d",&coeff,&exp); temp=(struct node*)malloc(sizeof(struct node)); temp->coeff=coeff; temp->exp=exp; temp->link=NULL; if(TP==NULL) { TP=temp; LTP=temp; } else { LTP->link=temp; LTP=temp; } } return TP; } void display(struct node*temp) ...