TheSuyog
unread,Aug 12, 2010, 11:01:48 AM8/12/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Knowledge Test
Function pointer or not, a pointer is always an ordinary pointer. Its
type depends on not the size (as its same in both cases) but 2 facts
that (1). its got arguments in its declaration which it passes to the
function it points to, like ur example states int (*fptr) (int, int);
and if the function pointer points to function with no arguments then
simply int (*fptr) (void); and (2). it points to a location where a
function starts. The 2nd fact comes into handy at runtime, at compile
time compiler distinguishes between a function pointer and an ordinary
pointer through the 1st fact.
I hope I'm clear.