# C Program to evaluate the given polynomial P(x)=AnXn + An-1Xn-1 + An-2Xn-2+… +A1X + A0, by reading its coefficents into an array.

Write a C program to evaluate the given polynomial P(x)=AnXn + An-1Xn-1 + An-2Xn-2+… +A1X + A0, by reading its coefficents into an array.A Polynomial is a mathematical expression involving a sum of powers in one or more variables multiplied by coefficients. Read more about C Programming Language .

`/************************************************************ You can use all the programs on  www.c-program-example.com* for personal and learning purposes. For permissions to use the* programs for commercial purposes,* contact [email protected]* To find more C programs, do visit www.c-program-example.com* and browse!* *                                  Happy Coding***********************************************************/#include <stdio.h>#include <conio.h>#include <stdlib.h>#define MAXSIZE 10voidmain(){ int a[MAXSIZE]; int i, N,power; float x, polySum; clrscr(); printf("Enter the order of the polynomialn"); scanf("%d", &N); printf("Enter the value of xn"); scanf("%f", &x); /*Read the coefficients into an array*/ printf("Enter %d coefficientsn",N+1); for (i=0;i <= N;i++) {  scanf("%d",&a[i]); } polySum = a; for (i=1;i<= N;i++) {  polySum = polySum * x + a[i]; } power = N; /*power--;*/ printf("Given polynomial is:n"); for (i=0;i<= N;i++) {  if (power < 0)  {   break;  }  /* printing proper polynomial function*/  if (a[i] > 0)   printf(" + ");  else if (a[i] < 0)   printf(" - ");  else   printf (" ");  printf("%dx^%d  ",abs(a[i]),power--); } printf("nSum of the polynomial = %6.2fn",polySum);}`

Array In C Simple C ProgramsYou can easily select the code by double clicking on the code area above.