C++ Program to reverse a string | The Crazy Programmer
I think this logic is good than using multiple for loops #include #include #include using namespace std; int main(){char str1[20],str2[20]; int i=0,len; cout=0){str2[i] = str1[--len]; i++;} str2[i]='\0';
www.thecrazyprogrammer.com |