Cognizant interview question

get specific character from the string