I’m totally new to C. Here’s the question:
Write the function
fzero(double f(double),double x1, double x2)as we did in class and use it to find all the solutions of
sin( pi*x / (1+x^2) ) = 0.25.
Now, I don’t want you to solve the this. I’d missed this lecture and only want to understand what means
double f(double);
In that context, it means that
fis a function pointer to a function to that takes onedoubleargument, and returns adouble.As an example:
Note that there are two syntaxes for function pointers:
These are equivalent.