--- In [email protected], "Nico Heinze" <[EMAIL PROTECTED]> wrote: > > --- In [email protected], Nigel Duckworth <ntype@> wrote: > > > > Hello, this is my first post here. > > > > I don't believe you can run a C program without main( ) but either > > way... please explain why you would need to? > > > > Regards, > > > > Nigel > > > > 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++. > Such sort of questions is often asked in interviews when applying for > a job as a software developer. The best answer (in my opinion) is what > Thomas Hruska, owner of this group, has posted quite some time ago: > > "In compiler xyz, version a.b.c, this can be done with a #pragma main > <or whatever particular solution you know of for sure>. However, this > is bad practice as it is in no way standardised and by no means > conformant to any major C/C++ standards. So I avoid this sort of > features if at all possible; using such tricks refrains me from > writing clean, safe, secure, stable, and portable code. And except in > very special situations I don't see any need for such a feature. So if > I may ask you: why do you need such features?" > > O.k., the last sentence was not a quote from Thomas, but it can easily > show you whether your counterpart might be trustworthy at all; if they > react in a hostile manner, forget this company; sooner or later > working for this company will kill you because such managers do a bad > job and don't value their employees. > > Regards, > Nico > hi, i am Anvay ; the complier need to know from where to start to run the program when you are using it not only c,c++, else other languages like java,cobol,fortrun require to know where to start . basicaly, main() is a sequence of operation to be performed when you just have oops(object oriented programming ) contaning multiple object codes main() decide the sequence
so ,c program wihtout main() is a idiotic think !!!!! IT IS TRUE WHEN YOU KANOW PREPROCESSER DERICTIVES TO PROGRAM YOUR COMPILER!!!
