plz look at this code and tell me where I'm going wrong. I can't use another array to reverse the string.
const int MAX_SIZE = 15; // Max word size of word, allow for '\0'
void reverse(char word[]); // function prototype
int main() {
char word[MAX_SIZE];
cout << endl << "Enter a word : ";
cin >> word;
cout << "You entered the word \"" << word << "\"" << endl;
reverse(word);
cout << "The word in reverse order is " << word << endl;
return 0;
} // main
void reverse(char word[]) {
// you can have local scalar variables of type int and char
// However, you cannot have any local array variables
// This function will reverse the characters in the array word
char ch;
for(int i = 0, j = MAX_SIZE; i != j; i++, j--) {
ch = word[j];
if( (ch >= 'a' || ch >= 'A' ) && (ch <= 'z' || ch <= 'Z') )
word[i] = ch;
}
}