If i have a funtion int foo(const int A), am I allowed to do the following coding?
int (*Mypointer)(const int);
Mypointer = &foo;
In addition, am i also allowed to do the following which is without const in the declaration of the function pointer ?
int (*Mypointer)(int);
Mypointer = &foo;
Another interesting case is that, if I have int foo(int A) and I declare that
int(*Mypointer)(const int);
Mypointer = &foo;
I was given segmentation fault
int foo(int A)and I declare that ``` int(*Mypointer)(const int); Mypointer = &foo; ``` I was given segmentation fault. I edited this case in the question