Hi, I am not sure how to do this problem of reversing the strings. I need help o
ID: 3748186 • Letter: H
Question
Hi, I am not sure how to do this problem of reversing the strings. I need help on it and could you comment it as well so i know what is going on. Thank you so much. // Problem 5: reverseStrings (15 points) // Reverse the string s and print it, by using pointers. // Use pointer p and 'temp' char to swap 1st char with last, then 2nd char with (last-1) and so on.. // Finally print the reversed string at the end of this function // Hint: You might want to check if your logic works with even as well as odd length string. void printReversedString(char s[STRING_LENGTH]) { char temp; // not necessary to use this variable char *p = &s[0]; // pointer to start of string }