Siemens interview question

Some string and array programming questions.