+ 1
What does the following statement mean? int(*fp)(char*)
I got this question in a challenge and I dont understand int (*fp)(char*); The 4 possibility to answer were: 1. function taking a char* argument and returning a pointer to int 2. Pointer to a pointer 3. Pointer to an array of chars 4. pointer to function taking a char* argument and returns an int So when I use this code cout<<*fp; I get 1 So ... after some thinking I think its either 1 or 4, but I dont know it exactly, so I'm writing this question. I need/want to know what int (*fp)(char*) means and also wich one of the questions is right
2 odpowiedzi
+ 3
A pointer to function fp that accepts a pointer to char (open sized string) and returns an integer value. 4th one is correct.
0
scanf("%d4s", str)