Reversing C Strrings C Write Function Takes C String Input Parameter Reverses String Funct Q37214093

REVERSING C strrings in C++

Write a function that takes a C string as an inputparameter and reverses the string. The function should usetwo pointers, front and rear. The front pointer should initiallyreference the first character in the string, and the rear pointershould initially reference the last character in the string. Thefunction should reverse the string by swapping the charactersreference by front and rear, and then increment front to point tothe next character and decrement rear to point to the precedingcharacter, and so on, until the entire string is reversed. Write amain program in C++ to test your following function on

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.