void reverse(char *str) {int length = strlen(str);for (int i = length - 1; i >= 0; i--) {printf("%c", str[i]);}}
int main() {char str[100];printf("Enter a word: ");scanf("%s", str);
}
void reverse(char *str) {
int length = strlen(str);
for (int i = length - 1; i >= 0; i--) {
printf("%c", str[i]);
}
}
int main() {
printf("Reversed word: ");char str[100];
printf("Enter a word: ");
scanf("%s", str);
reverse(str);
return 0;
}