11/06/2023 5:50 am
Topic starter
Notifications
Clear all
What will happen if i call main() inside main() in c++ ?
0
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
- 14 Forums
- 1,836 Topics
- 5,052 Posts
- 0 Online
- 1,078 Members
Our newest member: Richardnop
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