1. ## I have answer correct?

What do the following statements?

Code:
`int f1(int a, double (*f)(float *b));`
f1 is a function that returns an integer and has two parameters:first is a int and the second is an pointer to a function than returns an double and than has a parameter:a pointer to a float.

Code:
`int f2(int a, double f(char c), int (*g)(int d, int *e));`
f2 is function than returns an integer and has three parametrers:a integer,a function f than returns a double and has a parameter(a char), a pointer to a function than returns a int and has two parameters:a int and a pointer to int.

Code:
`float *f3(double *a, int * (*f)(double));`
f3 is a function than return a pointer to a float and has two parameters: a pointers to a double,a pointer to a function than returns a pointer to a int whith a parameter(a double)

Code:
`double (*fc)(int a, float ff(void));`
fc is a pointer to a function than returns a double and has two parameters:an int,a function than returns a float and has non parameters.

Code:
`int *(*fd)(float *a, double *f(int *d));`
fd is a pointer to a function than returns a pointer to a int and has two parameters:a pointer to a int,a function than returns a pointer to a double and has a pointer to a int

2. Just looked at f1, and the error is that the function f parameter is a pointer to float, not a pointer to double.

You've got the right idea, however.

3. first time I've written on a sheet, After that I wrote on the computer...Maybe that's why I wrote wrong

I want to learn pointer to functions
If these answers are correct you can I still put a few questions?

4. f2 looked good, watch your spelling of parameters though. (doesn't bother me, but it might bother your boss or instructor).

Sure, if it's on this topic, ask away!

If it's on a different topic, please start up a new thread so it gets the attention it deserves.

5. ok,f2 is correct,but f3,fd,fc ?

Sure, if it's on this topic, ask away!
no,i wanna - you ask me any questions about "pointer to functions"(outside structures)

6. What's wrong with this one?
Code:

Code:
`int *(*fd)(float *a, double *f(int *d));`
fd is a pointer to a function than returns a pointer to a int and has two parameters:a pointer to a int,a function than returns a pointer to a double and has a pointer to a int

7. cdecl
Can be helpful tools. Of course, it's still important to understand... the concept.
The only thing you need to take note is
Code:
```  void foo( double f(double) );
is the same as
void foo( double (*f)(double)) ;```

8. fd is a pointer to a function than returns a pointer to a int and has two parameters:a pointer to a float,a function than returns a pointer to a double and has a pointer to a int
now is correct?

9. Originally Posted by Bayint Naung
cdecl
Can be helpful tools. Of course, it's still important to understand... the concept.
The only thing you need to take note is
Code:
```  void foo( double f(double) );
is the same as
void foo( double (*f)(double)) ;```
sow
double f(double)
is a pointer to function?

cdecl is only for linux?

10. Originally Posted by nutzu2010
now is correct?
Yes.