Pointer to function
Why we use function pointers?
Roughly I written the code for understanding purpose only...
char (*ptr_fun)(); // pointer to a function which returns char
ptr_fun = &fun; // assign the address of that fun to that pointer
Now the question is, what is the different between the below two function call even though both perform the same operation
ch = fun();
ch = *ptr_fun;
Kindly explain why the function pointers are used and what are the situations it required.
|All times are GMT. The time now is 12:14 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.