What is the output of below code?

string text = "Vishal Kumar Neeraj Pune";
string[] str_array = text.Split(',');
MessageBox.Show(str_array[1]);

 Posted by vishalneeraj-24503 on 12/18/2013 | Category: C# Interview questions | Views: 4204 | Points: 40
Select from following answers:
  1. Vishal
  2. Neeraj
  3. Kumar
  4. Pune
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Sergshu on: 12/1/2015 | Points: 10
string text = "Vishal Kumar Neeraj Pune";
string[] str_array = text.Split(',');

split by ',' ?
result is 1 (one) item

if you split by space you have this result

Login to post response