answersLogoWhite

0


Best Answer

#include #include int main() { int n,i; float a[30],x,sum; printf("Enter the val ue of \'n\'\n"); scanf("%d",&n); printf("Enter \'n+1\' values\n"); for(i=0;i0;i--) sum=(sum+a[i])*x; sum=sum+a[0]; printf("Evaluated result = %f \n",sum); getche(); }

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C program to evaluate the given polynomial fxa4x4 a3x3 a2x2 a1x a0 for given value of x and the coefficients using Horners method using single dimension arrays to store coefficient?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Polynomial multiplication in link list using c language?

#include#includestruct polynode{float coeff;int exp;struct polynode *link;};void poly_append(struct polynode **,float,int);void display_poly(struct polynode *);void poly_multiply(struct polynode *, struct polynode *, struct polynode **);void padd(float, int, struct polynode **);main(){struct polynode *first, *second, *mult;int i,coeff,exp,high;first = second = mult = NULL;printf("Enter the highest power of polynomial 1: \n");scanf("%d",&high);for(i=high;i>0;i--){printf("Enter value for coeff for X^%d : ",i);scanf("%d",&coeff);poly_append(&first, coeff,i);}printf("\nEnter the highest power of polynomial 2: \n");scanf("%d",&high);for(i=high;i>0;i--){printf("Enter value for coeff for X^%d : ",i);scanf("%d",&coeff);poly_append(&second, coeff,i);}printf("\n\n");display_poly(&first);printf("\n");display_poly(second);printf("\n");for(i=1;i coeff = c;r -> exp = e;r -> link = temp -> link;temp -> link = r;return;}temp = temp -> link; /* go to next node */}r -> link = NULL;temp -> link = r;}}


Define an expression that evaluates to true when i equals j?

In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.


What does it mean to evaluate cobol?

The word evaluate in the programming language COBOL can be used to replace a nested if statement. Instead of long statement evaluate allows one to shorten the coding required and write cleaner code.


What is the difference between do while and while loop in java?

A do-while loop guarantees the body of the loop will execute at least once. A while loop might not execute at all. // this code will execute, even though the condition test will always evaluate to false do { // stuff }while(false); // this code will never execute because the condition test will always evaluate to false while(false) { // stuff }


Evaluate the expression 12?

Constant values are expressions as well, still I don't think they are so hard to evaluate... well, in this case it is twelve

Related questions

How do you answer polynomial?

You can evaluate a polynomial, you can factorise a polynomial, you can solve a polynomial equation. But a polynomial is not a specific question so it cannot be answered.


Finding values of polynomial functions?

Substitute that value of the variable and evaluate the polynomial.


How do you find the y interecepts for polynomial functions?

You set x = 0 and evaluate the polynomial. Note that this should be "y-intercept" in the singular, not in the plural.


Evaluate the polynomial expression using linked list using c?

Evaluating a Polynomial expression using a singly linked list visit : http://myfundatimemachine.blogspot.in/2012/06/polynomial-evaluation-in-c.html


Evaluate the effectiveness of a disinfectant with a phenol coefficient of 40?

A disinfectant with a phenol coefficient of 40 indicates that the chemical agent under study is 40 times as effective as phenol.


What serves as standard of comparison to evaluate effect of the independent variable on dependent variable?

The correlation coefficient, plus graphical methods to verify the validity of a linear relationship (which is what the correlation coefficient measures), and the appropriate tests of the statisitical significance of the correlation coefficient.


What is a zero of polynomial function?

A zero of a polynomial function - or of any function, for that matter - is a value of the independent variable (often called "x") for which the function evaluates to zero. In other words, a solution to the equation P(x) = 0. For example, if your polynomial is x2 - x, the corresponding equation is x2 - x = 0. Solutions to this equation - and thus, zeros to the polynomial - are x = 0, and x = 1.


How do you find the values of the polynomial function?

That all depends on the meaning of the context. If you want to determine the values of the polynomial function, then you need to substitute the value for the input variable of the function. Finally, evaluate it. For instance: f(x) = x + 2 If x = 2, then f(2) = 2 + 2 = 4.


What is a zero of a function?

Assuming the polynomial is written in terms of "x": It means, what value must "x" have, for the polynomial to evaluate to zero? For example: f(x) = x2 - 5x + 6 has zeros for x = 2, and x = 3. That means that if you replace each "x" in the polynomial with 2, for example, the polynomial evaluates to zero.


Polynomial multiplication in link list using c language?

#include#includestruct polynode{float coeff;int exp;struct polynode *link;};void poly_append(struct polynode **,float,int);void display_poly(struct polynode *);void poly_multiply(struct polynode *, struct polynode *, struct polynode **);void padd(float, int, struct polynode **);main(){struct polynode *first, *second, *mult;int i,coeff,exp,high;first = second = mult = NULL;printf("Enter the highest power of polynomial 1: \n");scanf("%d",&high);for(i=high;i>0;i--){printf("Enter value for coeff for X^%d : ",i);scanf("%d",&coeff);poly_append(&first, coeff,i);}printf("\nEnter the highest power of polynomial 2: \n");scanf("%d",&high);for(i=high;i>0;i--){printf("Enter value for coeff for X^%d : ",i);scanf("%d",&coeff);poly_append(&second, coeff,i);}printf("\n\n");display_poly(&first);printf("\n");display_poly(second);printf("\n");for(i=1;i coeff = c;r -> exp = e;r -> link = temp -> link;temp -> link = r;return;}temp = temp -> link; /* go to next node */}r -> link = NULL;temp -> link = r;}}


What are the conditions for error to be minimum in least squares approximation?

Let's start with a first degree polynomial equation:This is a line with slope a. We know that a line will connect any two points. So, a first degree polynomial equation is an exact fit through any two points with distinct x coordinates.If we increase the order of the equation to a second degree polynomial, we get:This will exactly fit a simple curve to three points.If we increase the order of the equation to a third degree polynomial, we get:This will exactly fit four points.if we have more than n + 1 constraints (n being the degree of the polynomial), we can still run the polynomial curve through those constraints. An exact fit to all constraints is not certain (but might happen, for example, in the case of a first degree polynomial exactly fitting three collinear points). In general, however, some method is then needed to evaluate each approximation. The least squares method is one way to compare the deviations.


How do you convert hexa into decimal?

I presume by hexa you mean hexadecimal, which is base 16. A hexadecimal number can be considered a polynomial in a variable whose value is 16, the coefficients being whole numbers ranging from 0 to 15. The hexadecimal digits after 9 are usually written as the letters A through F (sometimes in lower case); A means 10, B means 11, and so on. Just plug in 16 for the variable and evaluate the polynomial. For example, consider the hexadecimal number 3E7. The 7 is in the units place, the E, meaning 14, is in the 16's place, and the 3 is in the 162 (256) place. So the value of this number, in decimal, is 3 x 256 + 14 x 16 + 7, which works out to be 999 (so help me, I picked those digits at random!).