Folks, my professor has assigned us an assignment involving typing with arrays, pointers, and functions. Now, before you jump on my back with the whole “We aren’t going to do your homework for you” thing, the answer to my question will not solve the problem. In fact, I’ve already taken my best guess at the answer. I am just curious to hear what you think about this.
Here is the C statement I was given:
double(*foo(double(*)(double,double[]),double))(double, ...);
Our problem involved describing the type of foo. My question is simply this: What on earth does this statement do? As far as I can read it, this is either one of the most obfuscated and unrealistic lines of code I’ve ever seen, or it’s not actually valid C. Let me know what you think.
What you want to learn is the Clockwise Spiral Rule. Learning this will help you describe, in plain words, what any type in C is. Learn it well.