I am trying to explore Signals
in C Language. I was expecting the bellow code should print Error Signal in the console. but it doesn't. I am using Visual Studio 2017
C++ console application.
Do I need to set any setting here?
#include <stdio.h>
#include <signal.h>
static void catch_function(int signo)
{
printf("Error Signal");
}
int main()
{
int i = signal(SIGFPE, catch_function);
int x = 0;
int y = 100;
int z = y / x;
printf("Hello World %d", &z);
return 0;
}