0
can we use more than 1 main fuction in a program....if yes how and how compiler work
7 ответов
+ 1
Also, why would someone use multiple main functions? I would consider this a "bad practice" as it is confusing which of the main functions is being called from the operating system. I would assume that this is unnecessarily confusing to many other developers, too, with no gain I can see.
+ 1
No as compiler start compiling the program form main() and if there are two main() then compiler gets confused and also program may not run.
0
yes
0
we can use
0
ya we can do that
0
sure
0
If you can define multiple main functions, which one will be called by the operating system to start the program?