What is the output?

static void Main(string args[])
{
int x = 10;
int y = 20;
int z;
Console.WriteLine(z = ++x + y++);
Console.WriteLine(y);
}

 Posted by Amatya on 4/25/2016 | Category: C# Interview questions | Views: 2294 | Points: 40
Select from following answers:
  1. 31 ,21
  2. 30, 21
  3. 32, 20
  4. None of these
  5. All Above

Show Correct Answer


Source: My Notes | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Phanikumar on: 5/1/2016 | Points: 10
Here in the above answers the value of y is 21 plese correct it

Login to post response