CSharp - What is the output: Dividing by a zero valued variable?


What is the output of the following code?

using System;
class MainClass
   public static void Main(string[] args)
         int b = 0;
         int c = 5 / b;


Click to view the answer

int c = 5 / b;      // throws DivideByZeroException


Dividing by a variable whose value is zero generates a runtime error DivideByZeroException.