Write a program to get a character at index of a given string