What will be the output of the following C# code? [code] static void Main(string[] args) { int a = -1; int b = -1;

Pham Quỳnh

New member
What will be the output of the following C# code?
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
 

Tìm kiếm

Back
Top