Pointers to functions
Asim Jalis
aj3u at wilbury.cs.virginia.edu
Wed May 15 04:06:42 AEST 1991
What is the difference between these two (pf is a pointer to a
function, and hello is a function):
pf = hello;
and
pf = &hello;
The definitions for pf and hello are as follows:
void (*pf)(); // pointer to a function
void hello()
{
printf("Hello World\n");
}
I used the two different forms of assignments and got the same output.
Is there a difference between them?
Asim.
More information about the Comp.lang.c
mailing list