0

How to implement reversestring() function with const char *string

Iā€™ve been trying to figure out how to implement a reversestring() function with the following function call: char * reversestring(const char *string) { } I havenā€™t had any luck, any help?

15th Feb 2022, 8:50 PM
Taylor Cameron
Taylor Cameron - avatar
3 Answers
+ 1
Take a character array. Use a loop to assign array characters from indexes strlen(string) -1 to 0 into new array from 0 to strlen(string) Return new character array...
15th Feb 2022, 9:18 PM
Jayakrishna šŸ‡®šŸ‡³
+ 1
17th Feb 2022, 12:02 AM
Taylor Cameron
Taylor Cameron - avatar
0
you're welcome... Taylor Cameron Edit: Use int main(){
17th Feb 2022, 6:42 PM
Jayakrishna šŸ‡®šŸ‡³