Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Write Function Called Reversecstring Takes Cstring Input Parameter Reverses String Functio Q35594207

Write a function called reverseCString that takes acstring as an input parameter and reverses the string. The functionshould use two pointers, front and rear. The front pointer shouldinitially reference the first character in the string, and the rearpointer should initially reference the last character in thestring. Reverse the string by swapping the characters referenced byfront and rear, then increment front to point to the next characterand decrement rear to point to the preceding character, and so on,until the entire string is reversed. The function should handle atmost 30 meaningful characters. Write a main program to test yourfunction on various strings of both even and oddlength.

It is recommended you implement this using user input soyou can test your code repeatedly.

Leave a Reply

Your email address will not be published. Required fields are marked *