S

Shivam • 8.86K Points
Tutor III

Q. What will be the output of the following C# code?

Code:
static void Main(string[] args)
 {
     int a = 5;
     int b = 10;
     int c;
     Console.WriteLine(c = a-- - ++b);
     Console.WriteLine(b);
     Console.ReadLine();
 }
  • (A) -7, 10
  • (B) -5, 11
  • (C) -6, 11
  • (D) 15, 11
  • Correct Answer - Option(C)
  • Views: 122
  • Filed under category C#

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics