-
What is the output of this program?
#include <iostream>
#include <exception>
#include <cstdlib>
using namespace std;
void TerminateFunction()
{
cout << "terminate handler called...";
abort();
}
int main (void)
{
set_terminate (TerminateFunction);
throw 0;
return 0;
}
-
- Compilation Error
- Runtime Error
- terminate handler called...
- Aborted
- None of these
Correct Option: D
In this program, We are using set_terminate to abort the program.