Possible Duplicate:
C program without main function ?
Can we write a c program without main()
which can run and execute?
Please reply...
Possible Duplicate:
C program without main function ?
Can we write a c program without main()
which can run and execute?
Please reply...
No, you can not. You can write a library that will be used from another program. But everything must have a beginning, and 'main' is the beginning of a C program...
(On Windows, the Win32 API specifies a WinMain, but it's the same thing, with a different name.)
No, without the main method, the linker will not know where the start of the data segment in the program will start.