24/03/2023 6:51 am
Topic starter
Notifications
Clear all
What happens when you call main() inside main() ?
Students’s Forum
1
Posts
2
Users
1
Likes
476
Views
0
Add a comment
1 Answer
1
24/03/2023 7:36 am
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. It will cause a stack overflow when the stack space is used up.
Add a comment
Add a comment
Forum Information
- 14 Forums
- 1,837 Topics
- 5,053 Posts
- 0 Online
- 1,079 Members
Our newest member: Tyronenodub
Latest Post: loli
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed