How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string?
I think there is another way to reverse the string. get the input from user and reverse it.
void Rev() { char ch; cin.get(ch); if(ch != '\n') { Rev(); cout.put(ch); } }