Hello.
The task is to compare the first letter of the word with the last.
Example: anna begins with the letter a and ends with the letter a and these words are 2 of us.
Thank you for your reply. :)
void main(){ char str[] = "hello to anna annna"; int total = strlen(str); int counter = 0; char temp = str[0]; for (int i = 0; i < total; i++){ if (str[i] == ' '){ if (str[0] == str[i-1]){ counter++; i = 0; } } } printf("%d",counter); }