Multiple choice technology programming languages

What is the output of the command $sed 's/([a-z]) *([a-z])/\2,\1/' file

  1. sAGAR,PRAVEEN

  2. Sagar, praveen

  3. ,SAGAR,PRAVEEN

  4. sagar,Praveen

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

The sed regex captures two lowercase words and swaps them with a comma and space. Given input like 'praveen SAGAR', it produces 'Sagar, praveen' - the first word becomes lowercase at start, second word capitalized at start, comma-space separated.