Examveda

What will be the output of the following C# code?
static void Main(string[] args)
{
   int X = 6,Y = 2;
   X  *= X / Y;
   Console.WriteLine(X);
   Console.ReadLine();
}

A. 12

B. 6

C. 18

D. Compile time error

Answer: Option C


Join The Discussion

Related Questions on Classes and Objects in C Sharp