Write a function called reversit that reverses a string an


Program

Write a function called reversit() that reverses a string (an array of char ). Use a for loop that swaps the first and last characters, then the second and next to lastcharacters and so on. The string should be passed to reversit() as an argument.

Write a program to exercise reversit(). The program should get a string from the usre, call reversit(), and print out the result. Use an input method trhat allows the embedded blanks. Test the program with Napoleons famous phrase, "Able was I ere I Saw Elba)".

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a function called reversit that reverses a string an
Reference No:- TGS01475512

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)