diff --git a/StringDetails.cpp b/StringDetails.cpp new file mode 100644 index 0000000..8afac07 --- /dev/null +++ b/StringDetails.cpp @@ -0,0 +1,29 @@ +#include +#include + +using namespace std; +string reverse(string& rev) +{ + int n = rev.length(); + for (int i = 0; i < n / 2; i++) + swap(rev[i], rev[n - i - 1]); + return rev; +} +int main() +{ + string str,rev; + cout<<"Enter String :"; + cin>>str; + rev=str; + cout<<"String details\nLength : "<