Can there be recursive use of main? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can there be recursive use of main?

what are its advantages and disadvantages....

13th Nov 2016, 8:00 PM
sanket jain
sanket jain - avatar
2 Answers
+ 2
You are never going to need main to be recursive. If you want recursion, then just create another function; don't go through unnecessary hassle.
14th Nov 2016, 1:53 AM
Cohen Creber
Cohen Creber - avatar
+ 1
From what I read you can try to do it, but I don't think it'll work, main is not just any kind of function. What can happen is that it won't even compile (the better case) or it does compile, but something undefined can happen, it probably won't do what you would like it to. You can try it If you want to, but I wouldn't recommend it.
13th Nov 2016, 10:31 PM
‎ɐısıօլɐ
‎ɐısıօլɐ - avatar