Check Function Parameters Bad Code: char get_char_at(char* text, int index) { return text[i]; } Good Code: char get_char_at(char* text, int index) { if (text && strlen(text) > i) return text[i]; else /* error - return some default value? */ return '\0'; }