This is a discussion on without main function how can we run c program within the C and C++ forums, part of the Programming Talk category; Hi How can we run a " C Langauge program without writing the main function It is possible to do ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
When a C program is executed the main() is the function called by the run-time environment. But it is possible to write C program without main() function with some trick. I have not done this but will make a try and let you know. Nice question posted which triggered me to try this out.
|
|
|||
|
shri code
Quote:
.......................................................... |
|
|||
|
Quote:
That's still has a main function. If you trace through what the #define's are doing it's just changing "begin()" to "main()". The compiler still sees and compiles "main()". It sounded like Dharmesh rathod wanted no main function whatsoever rather than obfuscated code. |
|
|||
|
ans
Quote:
a program must have a main function (compulsory) without main it is impossible |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-15-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:01 AM |
| comp.lang.c FAQ list Table of Contents | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 05-15-2004 07:00 AM |