Question: Reverse String and c-string Write a function that has the following prototype; char* reverse(char arr [ ], const int size); // returns the reverse of

Reverse String and c-string

Write a function that has the following prototype;

char* reverse(char arr [ ], const int size); // returns the reverse of arr

void print (char arr [ ], const int size);

#i in main call print, reverse, print, reverse on Gravity to get this output

Gravity

ytivarG

Gravity

#include for test purpose result.

#include

#include

using namespace std;

char* reverse(char arr [ ], const int size);

void print (char arr [ ], const int size);

int main () {

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!