
Notifications
Clear all
What will happen if i call main() inside main() in c++ ?
0
11/06/2023 5:50 am
Topic starter

Explain why ?
Answer
Add a comment
Add a comment
1 Answer
0
13/06/2023 7:53 pm
Yes, we can call the main() within the main() function.
The process of calling a function by the function itself is known as Recursion.
Well,you can call a main() within the main() function ,but you should have a condition that does not call the main() function to terminate the program.
Otherwise,the program will never return and run infinitely.
Add a comment
Add a comment
Forum Information
- 22 Forums
- 1,969 Topics
- 5,307 Posts
- 0 Online
- 1,282 Members
Our newest member: TimothySenue
Latest Post: Space bug using " & n b s p ; "
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed