Question: Exercise 2 Write a C program to calculate the following quadratic function. f ( x ) = a x 2 + b x + c

Exercise 2
Write a C program to calculate the following quadratic function.
f(x)=ax2+bx+c
The constants a,b,c are the last three digits of your ID. For example, if your ID is A12345, then, a=3,b=4,c=5. Declare an int type array, and fill the array with the last three digit of your ID, Figure 4 illustrates the filled array:
\table[[3,4,5]]
Declare three pointers which points to each of the three array element. As Figure 5 illustrates:
The following function prototype is given to calculate the quadratic function:
int quadratic (int *aptr, int *bPtr, int *cPtr);
Given than x=5. Write the function definition for the function quadratic. Calculate the quadratic function.
Using only the pointers display the:
a. The last three digits of your ID
b. The memory location of each of the pointers
Display the calculated value of the quadratic function.
The program's output display must follow the format of output display shown in Figure 6(example for ID:A12345):
 Exercise 2 Write a C program to calculate the following quadratic

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!