what do following declaration signify?? void (*cmp)(); | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

what do following declaration signify?? void (*cmp)();

26th Jul 2017, 7:29 AM
Shwati Kumari
Shwati Kumari - avatar
2 Answers
+ 2
It's a pointer to function. You can assign to it an address of any function which returns void and has no parameters and later call assigned function via this pointer.
26th Jul 2017, 1:11 PM
soman
+ 3
cmp is a function that returns a void pointer.
26th Jul 2017, 7:30 AM
Shwati Kumari
Shwati Kumari - avatar