c - Function pointers and necessity -
this question has answer here:
- what point of function pointers? 15 answers
i interested in cracking minute things in c.
function pointer:
from know, function pointer nothing more c variable points address of function normal c variable. can call function using pointer also.
questions:
- what necessity of using function pointers rather using functions alone?
- will advanced thing normal function cannot do?
according wikipedia, “in computer programming, callback reference executable code, or piece of executable code, passed argument other code. allows lower-level software layer call subroutine (or function) defined in higher-level layer.”
in c callbacks implemented using function pointers. example, see link.
can normal function take function 1 of arguments ? callback advanced thing in sense , function pointers implement them.
further, use case explained here.
Comments
Post a Comment