Executing a Member Function After main() Terminates
You can execute any member function or any other execution after a termination of main() function by using “#pragma exit.”Here’s the syntax: #pragma exit [priority] //withoutsemicolon Now, here’s an example: