This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Function Pointer to main()


Hi Everyone,

I was playing with my compiler and so I tried this:

int main (){
   int (*p_func)() = main;
   p_func();
}

I was trying to perceive more about the details of main function. Could
someone explain me what the program tries to do? Why
doesn't the program begin a infinite recursion?


(forgive me my english) Brazil, Pedro Henrique









_______________________________________________________ Promoção Yahoo! Acesso Grátis: a cada hora navegada você acumula cupons e concorre a mais de 500 prêmios! Participe! http://yahoo.fbiz.com.br/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]