So, I wrote the following code:
void main(void) {
int charNums[ALPHABET], i = 1;
char word[MAX];
while(i) {
initialize(charNums, word);
getString(word);
setLetters(charNums, word);
getString(word);
checkLetters(charNums, word);
if(isZero(charNums))
printf("Anagram\n");
else
printf("Not anagram\n");
}
}
The while loop is infinite, which it is supposed to be. My professor said something about using CTRL-C to exit the infinite while loop, but that doesn't work with what I've coded. Am I missing something simple or what? Can someone please point me in the right direction? Thank you! (Note: this is only a portion of the code.)