On 29 Aug 2007 08:01:46 -0000, vinit patil <[EMAIL PROTECTED]> wrote:
> On Wed, 29 Aug 2007 Balaji Shenbaga Rajan wrote :
> >Is it possible to create a C program with out main function
> >
>
> It is not possible to write c program without main function.

Yes it is. Many Windows programs start with WinMain() for example. The
Standard even allows for non-hosted implementations to not have a
main().

> because the compiler executes the statement with in the main function..

The compiler does no such thing. The compiler is the software that
takes the source code and creates object code (which may, e.g., be a
windows dll which isn't even a stand alone executable.) It doesn't
execute anything within the source code.

And in case you meant the operating system, then behind the scenes,
'main' (or whatever is in it's place - see WinMain above) will not
usually be the first thing called since there will be some form of
setup required before main starts executing.

> without which
> can not run the program.



-- 
PJH
"Statistics are like a bikini. What they reveal is suggestive, but
what they conceal is vital"
-- Aaron Levenstein

Reply via email to