Motorola Solutions interview question

String and array basic question