What will be the output of the below C# code?
protected void btn_click(object sender,eventargs e)
{
int cnt = 50;
MessageBox.Show(cnt.ToString());
if (cnt == 50)
{
cnt = 10;
MessageBox.Show(cnt.ToString());
}
MessageBox.Show(cnt.ToString());
}

 Posted by vishalneeraj-24503 on 12/2/2014 | Category: C# Interview questions | Views: 2458 | Points: 40
Select from following answers:
  1. 50 10 50
  2. 50 10 10
  3. 10 10 10
  4. Compilation Error
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response