Oopss no idea
may be consider one poly use two loops Check term by term with all remaining poly
considering p4 (in program p[0])
for(i=0; i<MAX_EXP; i++)
{
for(j=0; j<k; j++)
{
for(int m=0; m<k; k++)
{
if(p[0].term[j].expo = p[i].term[m].expo)
p[0].term[j].coeff += p[i].term[m].coeff;
}
}
}
But if exponent are in decreasing order and dont think this type of comparisn may be needed ..
Hope it helped