See Debraj,
Do you know what for we use the main ??
It makes some initializations for the codes to follow - like setting up 
parameters setting global variables, etc. If you are asking for knowledge 
sake - I'd say its not allowed by C language.
Again like others I want to know why do you want to write a program without 
main.
basically 'main()' is serves as the starting and terminating point. If you 
write a program it has to start and terminate at some point - main() serves 
this purpose.
All compilers use some sort or another of 'main()'.
Any doubts are welcome, just don't ask silly ones
Regards,
Debasish



******************************************************************************
<html><DIV>
<P><FONT face="Lucida Handwriting, Cursive" color=#ff9900 
size=2>Karmennavava Dhikaraste, Maaphaleshu 
Kadaachanah</FONT></P></DIV></html>





From: debraj choudhury <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [c-prog] Re: cn we run a c program without main( )?
Date: Sat, 10 Feb 2007 23:38:03 -0800 (PST)

sir,
        can u explain in more detail manner, how a c program can be executed 
without using main() function and which compilers allow us to do so.......



--- In [EMAIL PROTECTED] com, "Paul Herring" <pauljherring@ ...> wrote:
 >
 > On 2/10/07, Nico Heinze <[EMAIL PROTECTED] .> wrote:
 > > --- In [EMAIL PROTECTED] com, Nigel Duckworth <ntype@> wrote:
 > > >
 > > > I don't believe you can run a C program without main( ) but
 > > > either way... please explain why you would need to?
 > > >
 > > > subbu680 wrote:
 > > > >
 > > > > hello frenz
 > > > > can we run a cprogram without main( )?
 > > > > if yes i need code
 > >
 > > Some compilers allow you to do this, but it's by no means a
 > > standardised feature of C/C++.
 >
 > There is scope for it in The Standards. Non-hosted environments.

Thanks, Paul, of course you're right. Once again I was a tad too fast
to respond.

Regards,
Nico




Send instant messages to your online friends http://uk.messenger.yahoo.com

_________________________________________________________________
Get Married in 2007. Join Shaadi.com 
http://www.shaadi.com/ptnr.php?ptnr=mhottag

Reply via email to