Multiple choice

$TCS_Office = "TATA CONSULTANCY SERVICES LIMITED, MADHAPUR".

Which of the following piece of code will convert the above string into array of elements and assign to @TCS_Off_Addr @TCS_Off_Addr = ("TATA", "CONSULTANCY", "SERVICES", "LIMITED,", "MADHAPUR");

  1. @TCS_Off_Addr = split(' ', $TCS_Office);
  2. @TCS_Off_Addr = split / /, $TCS_Office;
  3. @TCS_Off_Addr = split($TCS_Office, ' ');
  4. Both Option 1 and Option 2 are correct

  5. All options 1, 2 and 3 are correct.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Yes, Both Options 1 & 2 are correct.