Cognizant Interview Question

get specific character from the string