I have the following code which should throw a division by zero exception while running. It seems that the exception is not be caught at all. I am using catch(...) to catch any exception from the try block. Is catch(...) a good approach to catch any exceptions from the try block??
try
{
printf("Try Block");
for (int i = 0; i < 10; i++)
{
printf("%d\n", 1 / i);
}
}
catch (...)
{
printf("Division by zero");
}