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
#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
Get step-by-step solutions from verified subject matter experts
