Ayu wrote: > --- In [email protected], "tujare_raj1" <tujare_r...@...> wrote: > >> can we call any function before "main" function in 'C' using any compiler >> without editing "start-up" file >> > in my opinion, i know that C can't call function before main function because > main function is root from the tree >
"main" is not the entry point of a C program. Compilers generate another function that the OS calls. This function sets up your global stuff, static variables, argc/argv, etc. and calls main. While technically possible to call a function before main, or to alter the behavior of the compiler's generated function, it serves no practical purpose. It is like climbing a mountain because it is there. -- John Gaughan http://www.jtgprogramming.org/
