Hello, I'm new to C, and I had a question about reversing a string. I have my code to print it in reverse, but what im looking to do is actually reverse the string in memory. This is what i have so far.Any ideas?
Code:#include <stdio.h>
#include <string.h>
int main(void) {
char string[80];
int size;
printf("Enter String: ");
scanf("%s", string);
size = strlen(string);
while (size >= 0) {
printf("%c", string[size]);
size--;
}
return 0;
}