Could someone please explain exactly what the for statement in this problem is doing step by step?
Code:#include <stdio.h> #include <string.h> int main() { char string[100], reversestring[100]; int x, y; printf("Enter the string to reverse:"); scanf("%s", string); for (i=strlen(string)-1, x=0; i>=0; x--, y++){ reversestring[y]=string[x]; } reversestring[y]='\0'; printf("Your string %s reversed is %s \n", string, reversestring); }