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