sathyashrayan said:
Is it the declaration 'a_func' satisfies the criteria of definition
when 'a_func' pointes with the properly defined function (as you
said)? Or I am missing some simple thing?
It's an object definition (it defines the pointer-to-function object
"a_func"). It's just not a function definition.
Roughly speaking, a definition is a declaration that creates the
entity being declared, whereas a declaration that isn't a definition
merely declares that the entity exists, but doesn't actually create
it. (All definitions are declarations.) For example:
int x; /* a definition; it creates x */
extern int y; /* not a definition; y is defined elsewhere */
void foo(void) { printf("Hello\n"); }
/* a definition of the function "foo" */
void bar(void); /* not a definition; bar is defined elsewhere */
Typedefs are a bit odd in that a typedef doesn't actually create a new
type, merely an alias for an existing type. But a typedef is a
definition because the thing it creates is the alias, not the type.
And now we wait for the experts to point out my errors.