adplus-dvertising
frame-decoration

Question

Select the output for the following set of Code :
static void Main(string[] args)
  {   
      int a = -1;
      int b = -1;
      if (Convert.ToBoolean (++a = ++b))
      Console.WriteLine("a");
      else
      Console.WriteLine("b");
      Console.ReadLine();
  }

a.

a

b.

b

c.

Compile time error

d.

Code execute successfully with no output

Answer: (c).Compile time error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Select the output for the following set of Code :