C
c beginner
i have a confusion about pointer to functions.can anybody help me to
overcome my confusion??
overcome my confusion??
this may do:i have a confusion about pointer to functions.can anybody help me to
overcome my confusion??
i have a confusion about pointer to functions.can anybody help me to
overcome my confusion??
i have a confusion about pointer to functions.can anybody help me to
overcome my confusion??
function pointer holds address of function that you have specified.
as you call function by pointer.
fp = foo(int,int);
so you can call as
*fp(1,2);
depending on requrement you just assign address of function to
pointer.
it will get executed through function pointer call.
Not quite like that. Let's define the function foo..Sachin said:function pointer holds address of function that you have specified.
as you call function by pointer.
fp = foo(int,int);
so you can call as
*fp(1,2);
depending on requrement you just assign address of function to
pointer.
it will get executed through function pointer call.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.