it just prints hello hi.only pointer to main function is passed.it is not invoked anywhere.so it wont enter into a recursive call :)
On Mon, Aug 22, 2011 at 12:56 AM, Romil ....... <[email protected]>wrote: > #include<stdio.h>int fun(int(*)()); > int main() > { > fun(main); > printf("Hi\n"); > return 0; > }int fun(int (*p)()) > { > printf("Hello "); > return 0;} > > > > -- > Romil > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
