c++ get last character of string code example Example: how to check where the last char is in a string c strlen(str);