Evaluating a polynomial at a given value of x and n
By following Horner's Method only n multiplications are needed.

#include &lt;stdio.h&gt;

int main()
{
   // n is the deg of polynomial
   // x is the value of polynomial for which it is to be evaluated
   int x=0,n=0,A[10],b,i;

   printf("Enter value of n,x \n");
   scanf("%d %d",&amp;n,&amp;x);

   //Taking coefficient values
   printf("Enter the coeficients\n");

   for(i=0;i&lt;=n;i++) scanf("%d",&amp;A[i]);

   for(i = n - 1,b = A[n];i &gt;= 0;i--) b = b*x + A[i];

   printf("\nSum of polynomial is %d\n",b);

   return 0;
}