I cant recognise them as declarations of some arrays or so... Are they some declaration of functions with parameter & return type? If so, then how come function names are missing?
What do "int *p(char *a)" & "char (*p)(int *a)" mean?
Collapse
X
-
stazTags: None -
"int *p(char *a)" & "char (*p)(int *a)" mean?
This code is written to trip you up since beginners think "p" means "pointer". Because of that assumption, you can't read this code.
is a function named "p" that takes a char* argument "a" and returns a pointer to an int. You would have no problem were it written like this:Code:int *p(char *a)
This one:Code:int *MyFunction(char *arg)
defines "p" to be a pointer to a function that takes an int* arguments "a" and returns a char.Code:char (*p)(int *a)
I expect I am doing your homework, but at least now you know.
Comment