mariz said:
hi ,
i m a new member to this group . i start from the beginig - main().
Can any one give me an idea for how to write a program in C without
using main() ?
If you want to write and run a program in a hosted C implementation,
then you have to define the function `main` and have that function do
whatever you want your program to do. That's because that's how the
C implementation knows what your program does.
[A "hosted" implementation is the sort of thing you get on a desktop,
or a mainframe, as opposed to a "standalone" implementation, the
sort of thing you use for embedded systems and you may not have
an OS or if you do it does rather less than RISC OS or Linux or
whatever.]
ie while looking source code it wont contain main keyword.
Well, that's trivially easy, since main isn't a keyword; but
no, without playing implementation magic games ["dear linker,
all references to `main` should be interpreted as `start`"],
Standard (hosted) C doesn't let you do that.
It's not that you can't do it; it's that doing it, even if
its possible, requires non-standard non-portable techniques.
Why do you care?