Can we use pointers for functions?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 11

Can we use pointers for functions??

23rd May 2019, 6:18 PM
//(AnOnYmOuS);
4 Answers
+ 6
~ swim ~ can we do this in C also???
23rd May 2019, 9:56 PM
โœณAsterisKโœณ
โœณAsterisKโœณ - avatar
+ 4
~ swim ~ Under this context, I don't understand the functionality of asterisk in the (*fptr) part, somehow I doubt whether it is dereference operator or what. Can I get a little help with that please? TIA,
23rd May 2019, 8:54 PM
Ipang
+ 4
~ swim ~ To be honest, the C++11 way left me with yet another question, still from that lonely asterisk within the parentheses, the one that looks like `(*)` and I go "what is being declared there now that there's only that one asterisk?" ๐Ÿ˜ Lemme try to break it down, always correct me if I'm wrong ... typedef => introduce type alias int => function return type (*fp) => the alias (int, int) => function parameters list Tell me how close I get ... ๐Ÿ˜
23rd May 2019, 10:07 PM
Ipang
+ 4
~ swim ~ Thank you very much, I think I prefer one who knows a bit more and share, rather than one who knows a lot but keeping it themselves hehehe ๐Ÿ‘ โœŒ
23rd May 2019, 10:27 PM
Ipang