-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I hope the question is not silly.
1. Can there me more than one main in a C program.
No. There can be only one main() function in a program.
2. Can main take more arguments thac argc and argv.
No, yes, and maybe.
No. main() is defined to, in a hosted environment, only have two
arguments: int argc, and char **argv . The local declaration of main()
can either be
int main(void)
or
int main(int argc, char **argv)
(or equivalent)
However, some operating environments take some latitude with the
arguments passed to main(). Some Unixish environments, for instance,
include a third argument (char **envp) to provide access to commandline
arguments.
If yes then whar are they meant for??
What ever the implementation/environment dictates. See the relevant
documentation for your C compiler and execution environment for details.
- --
Lew Pitcher, IT Specialist, Corporate Technology Solutions,
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFD/wRAagVFX4UWr64RAnfhAKDQauBYPWgv6t/TosA2Ln3MZmSAagCffORm
HgoHT+iEBdbblIVp1CMw3EQ=
=q4Nu
-----END PGP SIGNATURE-----