Can I use a FOR loop as part of the condition for an IF statement?
For example, my problem is to create a program that will read in a string and compare it to a dictionary file in order to find anagrams of the original word. So I've attacked this by comparing the words of the same length, and anywhere that a letter is the same I'm aiming to change that to a character that isn't a letter, so I can use an IF statement in order to see if the temporary string is made up entirely of these characters, in which case it would be an anagram of the word.
However, because I don't initially know how long the word will be, I've said something like word[i] was the character of the string (where i starts at 0 and increases by 1 everytime), and so wanted to do a for loop until it ran out. Is this allowed by C?