What will be the out put of the following code:

try
{
   
double k = 19;   double m = 0;
   k = k / m;
  
Console.WriteLine(Convert.ToString(k));
  
Console.Read();
}
catch (Exception ex)
{
   Console.WriteLine(ex.Message);
}

Different data type behave differently for divide by zero exception.

The above code does not throw devide by zero exception, but it will quitly execute and 'k' will have the value of 'infinity'. So, don't depend on a exception here. However, if 'k' and 'm' are int then you will get the divideByZero exception